May 22, 20188 yr Author 9 hours ago, skunkworker said: I'm running into a strange issue. When editing a script and then clicking "run in background" the newly edited script does not get run, but the older revision does. It took me touching the file in /tmp in order to get the script updated. Gimme a day or so I'll check it out
June 16, 20188 yr basic question - if I have a custom cron schedule and a task is still running from the last execution (e.g. backup job), will the script get run again or only if it's not already running? Thanks
June 16, 20188 yr Author 4 hours ago, DZMM said: basic question - if I have a custom cron schedule and a task is still running from the last execution (e.g. backup job), will the script get run again or only if it's not already running? Thanks It'll run a second instance. To have it avoid that, your script needs to check if its already running In pseudocode: if tempFile exists then exit create tempFile the actual script here remove tempFile
June 16, 20188 yr 26 minutes ago, Squid said: It'll run a second instance. To have it avoid that, your script needs to check if its already running In pseudocode: if tempFile exists then exit create tempFile the actual script here remove tempFile Very simple but effective - thank you.
June 25, 20188 yr I'm having an issue with user scripts where when I have a script set to run in the background and then abort it, it stays running. This is my script: #!/bin/bash #---------------------------------------------------------------------------- # This script mounts your remote share with the recommended options. | # Just define the remote you wish to mount as well as the local mountpoint. | # The script will create a folder at the mountpoint | #---------------------------------------------------------------------------- # Local mountpoint mntpoint="/mnt/disks/cloud" # It's recommended to mount your remote share in /mnt/disks/subfolder - # This is the only way to make it accesible to dockers # Remote share remoteshare="cache:" # If you want to share the root of your remote share you have to # define it as "remote:" eg. "acd:" or "gdrive:" home="/mnt/user/appdata/rclone" tmpupload="$home/tmp" #--------------------------------------------------------------------------------------------------------------------- mkdir -p $mntpoint mkdir -p $tmpupload rclone --allow-non-empty --allow-other mount $remoteshare $mntpoint --cache-db-path=$home --cache-tmp-upload-path=$tmpupload --cache-tmp-wait-time=30m -vv And after "aborting" the script using the userscripts button this is what `ps auxw |grep rclone` says on the system: root 3230 0.0 0.0 9812 2044 pts/0 S+ 13:48 0:00 grep rclone root 27063 0.0 0.0 11956 2908 ? SN 12:48 0:00 /bin/bash /tmp/user.scripts/tmpScripts/rclone_mount_plugin/script root 27066 0.0 0.0 11960 2908 ? SN 12:48 0:00 /bin/bash /usr/sbin/rclone --allow-non-empty --allow-other mount cache: /mnt/disks/cloud --cache-db-path=/mnt/user/appdata/rclone --cache-tmp-upload-path=/mnt/user/appdata/rclone/tmp --cache-tmp-wait-time=30m -vv root 27068 0.8 0.2 155556 66464 ? SNl 12:48 0:31 rcloneorig --config /boot/config/plugins/rclone/.rclone.conf --allow-non-empty --allow-other mount cache: /mnt/disks/cloud --cache-db-path=/mnt/user/appdata/rclone --cache-tmp-upload-path=/mnt/user/appdata/rclone/tmp --cache-tmp-wait-time=30m -vv This same behavior is apparent in my plexdrive backgrounded script also. After aborting it still stays running. Am I doing something wrong here?
June 25, 20188 yr Author Any long running commands do not get aborted. You want the user script to start the "real" script in the background by doing something likeecho "pathToScrip" | at NOW -mSent via Tapatalk because I'm either at work or enjoying the summer
June 25, 20188 yr Ok, so I should fire off the mount with a subscript. And I suppose use a different script with a "killall rclone" or something like that? Not as elegant as I was hoping for but as long as I can make it work it's fine. I am curious to know why the abort button doesn't actually abort the script. It doesn't seem like it's very useful. If you set a script to "run in the background" it seems reasonable to assume the abort button will cancel that script. Right now it seems like it does nothing.
June 27, 20188 yr I had to fresh install unraid.. after installing user scripts it seems like the icon is missing.. anyone else experiencing this issue?
June 27, 20188 yr Author 1 hour ago, endiz said: I had to fresh install unraid.. after installing user scripts it seems like the icon is missing.. anyone else experiencing this issue? IDK Looks like something went wrong for some reason on install. I just did a fresh one and there's no problem with the icon
July 2, 20188 yr Hi guys, i need some help. I am trying to run custom cron of my scrub scripts, but recieve this: unRaid crond[1825]: exit status 127 from user root * /usr/local/emhttp/plugins/user.scripts/startCustom.php /boot/config/plugins/user.scripts/scripts/Scrubc/script > /dev/null 2>&1 my script is: (\config\plugins\user.scripts\scripts\Scrubc\script) #!/bin/bash /usr/local/emhttp/plugins/dynamix/scripts/notify -e "start_scrub_cache" -s "Scrub cache drive" -d "Scrub of cache drive started" -i "normal" -m "Scrubbing message" btrfs scrub start -rdB /mnt/cache > /boot/logs/scrub_cache.log if [ $? -eq 0 ] then /usr/local/emhttp/plugins/dynamix/scripts/notify -e "start_scrub_cache" -s "Scrub cache drive" -d "Scrub of cache drive finished" -i "normal" -m /boot/logs/scrub_cache.log else /usr/local/emhttp/plugins/dynamix/scripts/notify -e "start_scrub_cache" -s "Scrub cache drive" -d "Error in scrub of cache drive !" -i "alert" -m /boot/logs/scrub_cache.log fi Run/Run in Background works fine. Custom cron - dont.
July 2, 20188 yr That screenshot suggests you have 6 fields in the custom entry. On my system I only use 5 fields and custom cron jobs run fine. Not sure if this matters but thought it worth mentioning. Edited July 2, 20188 yr by itimpi
July 2, 20188 yr 10 hours ago, itimpi said: you have 6 fields in the custom entry Thank you so much for watching, man. I fixed it to 5 fields, I'll see how it works, I'll write it helped or not ? I'm almost sure that the reason for this P.S. Thanks, @itimpi , Problem solved! Edited July 2, 20188 yr by vanes
July 12, 20187 yr Thank you for this plugin! Is there a way to access a "Run Script" button via a URL? Would love to add links on our phones that we can trigger with a single press rather than opening a browser, going to the user scripts page and then pressing one.
July 12, 20187 yr I've added a /scripts pointing to /boot/config/plugins/user.scripts/scripts/ in radarr and sonarr to run a couple of my scripts. Do I need to do anything funky like RO/Slave etc, or just leave it as Read/Write? Thanks
July 12, 20187 yr Author Nope. /boot isn't an unassigned device, so you can just leave it at RW. Not that RW:Slave causes any problems though.
July 12, 20187 yr 41 minutes ago, Squid said: Nope. /boot isn't an unassigned device, so you can just leave it at RW. Not that RW:Slave causes any problems though. Thanks
July 14, 20187 yr Hi, I need to use expect for SSH connection, but it is not installed on unRAID by default. I am trying similar code like this: #!/usr/bin/expect -f spawn ssh [email protected] "ls /file" expect "password:" send "mypassword\r" Do anyone have any idea how can I install expect to unRAID? Thanks, Mark
July 14, 20187 yr 1 hour ago, MasterMark said: Do anyone have any idea how can I install expect to unRAID? Expect is included in nerd tools.
July 14, 20187 yr 11 hours ago, wgstarks said: Expect is included in nerd tools. Oh, I totally forgot nerd tools. Thanks a lot.
July 22, 20187 yr hopefully a simple request for you linuxy experts. I have the rclone custom script running to send CCTV footage of alerts to my gdrive. The script runs minimum 1 hour in user scripts - in which time the thief may have found my unraid system and nicked it too.... The 'custom' allows for a cron type input. What can I put in there for every 5 minutes ?
July 23, 20187 yr 3 hours ago, vw-kombi said: hopefully a simple request for you linuxy experts. I have the rclone custom script running to send CCTV footage of alerts to my gdrive. The script runs minimum 1 hour in user scripts - in which time the thief may have found my unraid system and nicked it too.... The 'custom' allows for a cron type input. What can I put in there for every 5 minutes ? */5 * * * *
July 23, 20187 yr I installed a new usb drive, bc the old was failing from time to time. I have CA Backup thingy. (but i cant find my scripts, only the preinstaleld scriptps got backed up ? ) Yesterday i set everything up, urrently i let a parity run. I thought all is fine, but sadly all my custom scripts are lost... how to backup them? Edited July 23, 20187 yr by nuhll
July 23, 20187 yr You can download a complete zipped backup of your flash drive at Main - Boot Device - Flash - Flash backup
July 23, 20187 yr Author 11 hours ago, nuhll said: I have CA Backup thingy. (but i cant find my scripts, only the preinstaleld scriptps got backed up ? ) They would all be in the destination you set for USB backup... config/plugins/user.scripts/scripts
July 24, 20187 yr I dont know why, but there are only the standard scripts... or... does it have a bug and cant backup ö ä ü ß ?
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.