November 25, 20205 yr 1 hour ago, jmbailey2000 said: crontab.guru is an online page that I use. Let's me put stuff in and shows you the result. Also has a huge page of examples of almost every type. Yes, I've used a couple of different ones, but like I say - the reference on the plugin page is useful as it shows the format that it specifically accepts.
November 27, 20205 yr hello, I'm noob to use a script... Can I run this example : docker exec -it nextcloud sudo -u abc php7 /config/www/nextcloud/occ files:scan --all Edited November 27, 20205 yr by thymon
November 28, 20205 yr 6 hours ago, Squid said: You definitely want to get rid of the -i as that means interactive nice ! Thanks 😊
December 6, 20205 yr I'm new to this and I'm hoping I can use this plugin to call the radarr V3 API. Specifically the /command endpoint ImportListSyncCommand. Is this possible? Where would I start?
December 6, 20205 yr 48 minutes ago, MajorTomG said: I'm new to this and I'm hoping I can use this plugin to call the radarr V3 API. Specifically the /command endpoint ImportListSyncCommand. Is this possible? Where would I start? See a few posts above for another example of running a command inside a docker.
December 7, 20205 yr How do I run any CA Userscript Script from within a Terminal Session? I know copies of scripts are held and ran from " /tmp/user.scripts/tmpScripts"....but when I go there via Terminal...I don't see ALL of my scripts listed (only a subset). It appears the only scripts listed here are ones which have been previously executed through Userscripts GUI. I know scripts are also located in "/boot/config/plugins/user.scripts/scripts" but those are all buttoned up with permissions restricting run (probably for good reason too since its the flash drive).
December 7, 20205 yr I'm trying to host a discord bot I made in python using the discordpy library, and I wanted to have the script ran every hour. however I'm not to experienced with bash so i'm a little stuck on running the script. this is the code I tried and I have installed the nerdpack plugin and enabled python3 in the settings. I have also rebooted my server after installing/enabling #!/bin/bash cd /mnt/user/scripts/Predicting_Alpha_Bot python bot.py When I run the script using the user script plugin it shows an error saying unknown command 'python'. I'm not sure if I have to specify the python path or anything so any help would be greatly appreciated!
December 7, 20205 yr 24 minutes ago, trurl said: Try it I'm new to unraid and not very experienced in bash so I'm not really sure how to try it or find the python path
December 9, 20205 yr [BUG] German Umlauts [äöüÄÖÜß] disappear during save I do have some scripts that do require German Umlauts (see above). I can put them into the big edit field but they disappear after saving the user script. For example: Within a user script I do call a python script to export data. I enter something like that (shortened): python3 [path]/ExportData.py -l Hörbücher After saving and reopening the script this is what became stored: python3 [path]/ExportData.py -l Hrbcher Thanks.
December 9, 20205 yr Author Yeah, it's not a bug, but by design. Trouble is that there were so many users copying / pasting scripts from the forums here and doing that introduces other unwanted characters into the script, that all non pure ASCII characters were removed. I'll revisit next week.
December 9, 20205 yr I have a python script that is being ran by the user script plug in however i'm using a package that is not native to python so I was wondering how I would install it on my server so that it can be used by my script. I tried pip installing it through the command line but got some errors so im wondering if there is another way. I have the error message in this file if needed. install error message.txt Edited December 9, 20205 yr by zaymus added file
December 11, 20205 yr On 12/9/2020 at 2:48 PM, Squid said: Yeah, it's not a bug, but by design. Trouble is that there were so many users copying / pasting scripts from the forums here and doing that introduces other unwanted characters into the script, that all non pure ASCII characters were removed. I'll revisit next week. Thanks in advance. IMHO: Don't modify user content in an entryfield automatically. It becomes a can of worms to decide and filter what's unwanted and what's intended. If you need to, check for unwanted characters and simply popup a small dialog "Non-ASCII characters detected. Are you sure?" and let the user decide.
December 11, 20205 yr On 12/9/2020 at 11:36 AM, zaymus said: I have a python script that is being ran by the user script plug in however i'm using a package that is not native to python so I was wondering how I would install it on my server so that it can be used by my script. I tried pip installing it through the command line but got some errors so im wondering if there is another way. I have the error message in this file if needed. install error message.txt My suggestion is to build a docker image (using one of the official python base images), include your python script (run it from the entrypoint) and all of its dependencies. Then run the container from your user script.
December 12, 20205 yr Im having a bit of an issue where aborting a script doesn't actually kill it. Is there a workaround so I don't have to manually hunt down and kill all the process every time. Thanks
December 12, 20205 yr Hi all, Sorry for the dumb question but: I want to execute a script created with the "CA User Scripts" plugin not from the Unraid GUI but from the terminal (or from another script for that matter). What is the simplest way to do so? I indeed noticed that the "/tmp/user.scripts/tmpScripts" directory only contains scripts which were previously run from the Unraid GUI, and that in the "/boot/config/plugins/user.scripts/scripts" directory, the scripts permissions are set to 600 which make them not executable. Many thanks, Best OP
December 12, 20205 yr Author 14 minutes ago, Opawesome said: in the "/boot/config/plugins/user.scripts/scripts" directory, the scripts permissions are set to 600 which make them not executable. Security precaution in Unraid. use this /bin/bash /boot/config/plugins/user.scripts/scripts/.....
December 12, 20205 yr 28 minutes ago, Squid said: Security precaution in Unraid. use this /bin/bash /boot/config/plugins/user.scripts/scripts/..... Dear Mr. @Squid., Awesome. You always come with such simple and elegant solutions . Thank you very much. Best regards, OP
December 14, 20205 yr I am looking for a script that would monitor a TCP port and accept commands to spinup, spindown, or return status of a disk. The the minimum capability I need would be a command to spin up all the disks in the array. I could have them spin down after 4 hours of inactivity. The major use of the array is to feed my own home theater movie system. The delay when loading a movie bothers me and I would like to spin up the the array disks when I open the theater's movie librarian. It is my belief that if disks are generally not being used keeping them in a spun down state will increase their longevity Any help or advice would be greatly appreciated.
December 17, 20205 yr Hello all, Thought I would post my experience here since my search-fu didn't come up with an answer, and someone else may have the same issue. I wanted to create a simple script to reboot my server once a week. My script worked when manually executed (RUN SCRIPT). However I was unable to make any schedule stick. I noticed that when hovering over the cog for pre-installed docker restart $(docker ps -q) no options appeared. The contents /boot/config/plugins/user.scripts/scripts contained the directory: docker\ restart\ $docker\ ps\ -q/ I renamed this directory to docker_restart and refreshed the User Scripts page and now hovering over cog displays options and I can apply a schedule to my new script. Cheers
December 17, 20205 yr 1 minute ago, Squid said: Don't name the script (as you did) using special characters That one isn't mine. It was one of the ones created when I installed the plugin
December 17, 20205 yr Author These are the only 3 that have ever come with the plugin. You've added it at some point. Removing and reinstalling the plugin doesn't ever clean up any other existing scripts
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.