Squid Posted September 28, 2016 Author Share Posted September 28, 2016 No trouble on my part. Just use crontab to add the jobs in crontab -l > /tmp/temp echo 25 0 * * * ssh [email protected] sudo shutdown -h now >> /tmp/temp crontab /tmp/temp something like that. Alternatively you can also mimic a plugin's cron entries by making a file called /boot/config/plugins/someDummyName/someDummyName.cron with the appropriate cron entry, and every reboot (not sure about starts) unRaid'll add in the cronjob automatically Quote Link to comment
amikaycin Posted October 2, 2016 Share Posted October 2, 2016 what time does the "scheduled daily" task run and is there any way to customize this? Quote Link to comment
Squid Posted October 2, 2016 Author Share Posted October 2, 2016 what time does the "scheduled daily" task run and is there any way to customize this? Install the dynamix schedules plugin (find it in CA) and you can then adjust the time of day via Settings - Schedules - Fixed Schedules Quote Link to comment
johnieutah Posted October 9, 2016 Share Posted October 9, 2016 This is a great plugin, been after something like this for a while as I loathe going to the command line So many thanks to Squid. A couple of suggestions: Minor: I've noticed the output doesn't seem to support UTF-8 chars, not sure if this is due to the plugin, the browser, the way the plugin captures the output etc... Major: It would be great to be able to manage scripts from the plugin page, i.e. create, edit and delete in a simple form. I know this has been suggested, but this would really make this an all-in-one solution IMO Quote Link to comment
Squid Posted October 9, 2016 Author Share Posted October 9, 2016 Minor: I've noticed the output doesn't seem to support UTF-8 chars, not sure if this is due to the plugin, the browser, the way the plugin captures the output etc... Major: It would be great to be able to manage scripts from the plugin page, i.e. create, edit and delete in a simple form. I know this has been suggested, but this would really make this an all-in-one solution IMO UTF - I'm using a built-in routine to display everything, and technically, the display format is actually full HTML, so you can rejig everything to display according to that. However, doing that will then make any logs if you run the script in the background look rather strange. And, yeah the editing, etc has been suggested before, but isn't at the top of my priority list. Quote Link to comment
landS Posted October 10, 2016 Share Posted October 10, 2016 On 6.2.1 via Unassigned Devices I see I can mount Remote SMB shares Currently I backup Tower1 shares to Tower2 using Rsync in a Tower2/VM Tower1 contains Exported Smb shares with both Read/Write and Read Only users Tower2 contains a Clone of Tower1 shares with Hidden Smb Shares all Read Only user On Tower2's VM I pass through the Shares and mount in FSTAB via Virito 9c. I mount the Tower1 shares in FSTAB via CIFS. http://lime-technology.com/forum/index.php?topic=45039.0 The Current Script run within the VM uses 2 types of backups: rsync -r -v --progress --ignore-existing -s /home/UbuntuUserName/tower1/writeonce/ /home/UbuntuUserName/tower2/writeonce rsync -r -v --progress --delete -s /home/UbuntuUserName/tower1/documents/ /home/UbuntuUserName/tower2/documents Can I skip the VM overhead and run the backup on Tower2 directly using the following? Mount the Tower1 shares via Unassigned Devices Plugins In a file saved under config/plugins/user.scripts/scripts/backup/script place the equivalent Rsync (are these correct) rsync -r -v --progress --ignore-existing -s /mnt/disks/writeonce/ /mnt/user/writeonce rsync -r -v --progress --delete -s /mnt/disks/documents/ / mnt/user/documents Schedule the running of the script via Squid's User Scripts plugin Thanks Crew! Quote Link to comment
John_M Posted October 15, 2016 Share Posted October 15, 2016 I installed the plugin onto unRAID 6.2.1 via Community Apps and noticed the following warning: Warning: array_diff(): Argument #1 is not an array in - on line 4 There's nothing mentioned in syslog and I haven't noticed any problems. I just thought I'd mention it. Quote Link to comment
tmchow Posted October 15, 2016 Share Posted October 15, 2016 Alternatively you can also mimic a plugin's cron entries by making a file called /boot/config/plugins/someDummyName/someDummyName.cron with the appropriate cron entry, and every reboot (not sure about starts) unRaid'll add in the cronjob automatically You can also just run update_cron to update the from schedules for changes in /boot/confit/plugins Quote Link to comment
Squid Posted October 17, 2016 Author Share Posted October 17, 2016 I installed the plugin onto unRAID 6.2.1 via Community Apps and noticed the following warning: Warning: array_diff(): Argument #1 is not an array in - on line 4 There's nothing mentioned in syslog and I haven't noticed any problems. I just thought I'd mention it. Thanks... Fixed... It was just a spurious error message (now suppressed) that only displayed on 100% clean installs. And it didn't affect anything at all. No update of the plugin is required, as I just changed the .plg to suppress it on clean installs. Quote Link to comment
johnieutah Posted October 17, 2016 Share Posted October 17, 2016 @Squid. You mentioned being able to view the log output from previous script runs. How do I view this? What is written to the log? - is it a full capture of the command line output? (would be great). Thanks. Quote Link to comment
John_M Posted October 17, 2016 Share Posted October 17, 2016 I installed the plugin onto unRAID 6.2.1 via Community Apps and noticed the following warning: Warning: array_diff(): Argument #1 is not an array in - on line 4 There's nothing mentioned in syslog and I haven't noticed any problems. I just thought I'd mention it. Thanks... Fixed... It was just a spurious error message (now suppressed) that only displayed on 100% clean installs. And it didn't affect anything at all. No update of the plugin is required, as I just changed the .plg to suppress it on clean installs. Cool. Thanks Squid. I confirm that it was indeed a clean install. Quote Link to comment
Squid Posted October 17, 2016 Author Share Posted October 17, 2016 Logs are saved when the script is run in the background or on a schedule. No log is captured if running in the foreground Sent from my LG-D852 using Tapatalk Quote Link to comment
Stokkes Posted October 25, 2016 Share Posted October 25, 2016 Wondering if someone can help.. I built a docker for Plex Sync (https://github.com/jacobwgillespie/plex-sync) which syncs your watch lists between multiple Plex Servers. I'm doing this because I"m slowly moving my Plex server to a Linode VPS backed by Amazon Drive (encrypted with EncFS) and I can't seem to get this running with User Scripts. The plex-sync tool is a bit finicky and requires I run the Docker command this way: docker run -ti --rm plexsync plex-sync TOKEN@source_ip/1 TOKEN@destination_ip/1 the -ti runs it in pseudoTTY and in interactive mode. Without these, the plex-sync tool (built on NodeJS) will simply not run for some reason. Trying to run this via User Scripts, I get this in the logs: Script Starting Mon, 24 Oct 2016 18:47:01 -0400 Full logs for this script are available at /tmp/user.scripts/tmpScripts/PlexSyncWatched/log.txt cannot enable tty mode on non tty input This is Docker throwing the error, I'm guessing due to the environment User Scripts uses to run. Any idea how I can get around this, I'd like to run this script on an hourly basis as I transition my Library to my VPS/ACD Thanks! Quote Link to comment
Squid Posted November 3, 2016 Author Share Posted November 3, 2016 ^^^^^^^^^ WooHoo!!! Was wondering why the spammers always ignored my threads... Now I feel special Quote Link to comment
Msan Posted November 3, 2016 Share Posted November 3, 2016 ^^^^^^^^^ WooHoo!!! Was wondering why the spammers always ignored my threads... Now I feel special He's posting all over the place.. Quote Link to comment
Squid Posted November 3, 2016 Author Share Posted November 3, 2016 ^^^^^^^^^ WooHoo!!! Was wondering why the spammers always ignored my threads... Now I feel special He's posting all over the place.. You just had to rain on my parade, didn't you Quote Link to comment
Msan Posted November 3, 2016 Share Posted November 3, 2016 ^^^^^^^^^ WooHoo!!! Was wondering why the spammers always ignored my threads... Now I feel special He's posting all over the place.. You just had to rain on my parade, didn't you What can I say, it's a gift.. Quote Link to comment
saarg Posted November 3, 2016 Share Posted November 3, 2016 ^^^^^^^^^ WooHoo!!! Was wondering why the spammers always ignored my threads... Now I feel special He's posting all over the place.. You just had to rain on my parade, didn't you What can I say, it's a gift.. You guys are seeing ghosts... Quote Link to comment
dockerPolice Posted November 3, 2016 Share Posted November 3, 2016 You guys are seeing ghosts... If the alleged perp strayed into docker territory, it would have been all over far sooner. As it stands, it was pluginCop (pfft) who, as usual was slow on the draw. http://images.wisegeek.com/arrested-in-handcuffs.jpg[/img] Quote Link to comment
pluginCop Posted November 3, 2016 Share Posted November 3, 2016 (edited) On 11/3/2016 at 6:55 PM, dockerPolice said: If the alleged perp strayed into docker territory, it would have been all over far sooner. As it stands, it was pluginCop (pfft) who, as usual was slow on the draw. Did I miss something? Edited June 19, 2019 by pluginCop 1 Quote Link to comment
RobJ Posted November 4, 2016 Share Posted November 4, 2016 I was a bit baffled by the posts above, investigated, spotted the IP's, and figured it out. And I'm not talking! Quote Link to comment
dockerPolice Posted November 4, 2016 Share Posted November 4, 2016 I was a bit baffled by the posts above, investigated, spotted the IP's, and figured it out. And I'm not talking! Quote Link to comment
glave Posted November 19, 2016 Share Posted November 19, 2016 Is it possible to have a script that only executes while the array is up? I was just going to do a cron job but I haven't found the functionality yet to test if the array is up. Quote Link to comment
Squid Posted November 19, 2016 Author Share Posted November 19, 2016 Is it possible to have a script that only executes while the array is up? I was just going to do a cron job but I haven't found the functionality yet to test if the array is up. You have to incorporate a test into your script. If the output of cat /var/local/emhttp/var.ini | grep "mdState" is mdSate="STARTED" then your script can continue Quote Link to comment
Squid Posted November 20, 2016 Author Share Posted November 20, 2016 (edited) Added: Inline variables to scripts Going forward, the file description is now deprecated on user scripts (but will remain supported) The recommended way of setting the description for the script(s) are via inline variables in the script itself. There currently only a few variables available that you can use: (but I'm thinking about others) description This is the description of the script - ie: what will show up on the UI for the plugin foregroundOnly Setting this to be true disallows background running (and scheduling) of the script backgroundOnly Setting this to be true disallows foreground running of the script arrayStarted Setting this to be true will only run the script (foreground or background or scheduled) if the array is up and running How to implement these variables: Immediately after the interpreter line (eg: immediately after the #!/bin/bash *) line, add these lines if you choose: #description=this is the description of the script #foregroundOnly=true #backgroundOnly=true #arrayStarted=true After the first non comment line within any script, parsing for these variables stops. (IE: they have to be right at the top of the script file) Note that you do NOT have to have any or all of the lines contained within any particular script. (Also, if you do have the description file present, then its contents takes precedence over the description variable) *PHP scripters: You can also place these variable lines immediately after the <? or <?PHP line Edited February 21, 2017 by Squid Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.