September 20, 20196 yr Hi can I get some help with what is probably an easy fix please. I've started using this python utility https://github.com/adamgot/python-plexlibrary where I've saved the files to /mnt/user/appdata/other/python-plexlibrary-master. When I run the python utility via command line from the folder e.g. python plexlibrary movies_recommended everything works fine, but when I try to do via script e.g: #!/bin/bash cd /mnt/user/appdata/other/python-plexlibrary-master python plexlibrary movies_recommended exit I get this error: Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/mnt/user/appdata/other/python-plexlibrary-master/plexlibrary/__main__.py", line 3, in main() File "plexlibrary/plexlibrary.py", line 61, in main r.run(args.sort_only) File "plexlibrary/recipe.py", line 696, in run missing_items, list_count = self._run() File "plexlibrary/recipe.py", line 172, in _run matching_total, item['title'], item['year'])) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 23: ordinal not in range(128) I've also tried: #!/usr/bin/env python cd /mnt/user/appdata/other/python-plexlibrary-master plexlibrary movies_recommended plexlibrary movies_imdb_top_250 exit Help please Help please
September 23, 20196 yr Does the 'At startup of Array' run before or after the go script? Does the 'At startup of Array' execute before or after ssh service daemon starts? Is there a chart somewhere showing the runtime levels (or order) per plugin or service?
September 23, 20196 yr Author 3 minutes ago, Julius said: Does the 'At startup of Array' run before or after the go script? Way, way after. When the array is actually started. 3 minutes ago, Julius said: Does the 'At startup of Array' execute before or after ssh service daemon starts? I would think after
September 23, 20196 yr Author 4 minutes ago, Julius said: Is there a chart somewhere showing the runtime levels (or order) per plugin or service? cat /usr/local/sbin/emhttp_event
September 24, 20196 yr Use the 'go' file for commands you want run as part of the Unraid boot process and a 'stop' file for commands to be run when the system is shutting down. The User Scripts plugin is for scripts to be used during normal Unraid operation.
September 24, 20196 yr 2 hours ago, itimpi said: Use the 'go' file for commands you want run as part of the Unraid boot process and a 'stop' file for commands to be run when the system is shutting down. The User Scripts plugin is for scripts to be used during normal Unraid operation. Is the 'stop' file supposed to be in the '/boot/config/' also?
September 24, 20196 yr 12 minutes ago, ICDeadPpl said: Is the 'stop' file supposed to be in the '/boot/config/' also? Yes. It goes in the same location as the ‘go’ file. I am not sure why Limetech do not provide a dummy file as part of the standard release.
September 24, 20196 yr 1 hour ago, itimpi said: Yes. It goes in the same location as the ‘go’ file. I am not sure why Limetech do not provide a dummy file as part of the standard release. You learn something new every day - didn't know about a stop file. In an ideal world there'd also be something like go_user and stop_user files that are called from go and stop where all custom config would go, leaving the core files stock and safe to update.
September 26, 20196 yr Author On 9/24/2019 at 5:29 AM, Cessquill said: didn't know about a stop file. It's a very esoteric piece of knowledge (and not documented anywhere). I found out about it this July, and it seems that only @BRiT and @itimpi knew about it previously.
September 26, 20196 yr The usage of the "stop" file is as undocumented as the usage of the folder "/extra" ...
September 26, 20196 yr Author 2 minutes ago, bonienl said: "/extra" That one though is common knowledge for anyone who came from v4/v5
September 26, 20196 yr 1 minute ago, Squid said: That one though is common knowledge for anyone who came from v4/v5 but still undocumented 😉
September 26, 20196 yr 1 minute ago, Cessquill said: This /extra? haha, not as undocumented as I thought 😄
September 26, 20196 yr 12 minutes ago, bonienl said: haha, not as undocumented as I thought 😄 I only stumbled on it as I didn't know what you guys were talking about
September 27, 20196 yr 19 hours ago, bonienl said: haha, not as undocumented as I thought 😄 🙂 I've also been using the /extra folder for quite some time. It saves me from having to install the nerdpack plugins, since I can just cherry pick the few packages I need (perl, pigz, ipmi tool, etc...). As well, I can pull from public repo's and update them when I want to, instead of having to bother a dev in here to update a package. stop file is new though! At what part in the shutdown sequence does it run, prior to stopping the array, or after all processes have been stopped right before power off? Edited September 27, 20196 yr by cybrnook
September 27, 20196 yr Stop file is definitely run after the array has been shut down, but I am not sure about other system services that are not dependent on the array. I will have to add a log message to mine to see exactly when it is run.
September 27, 20196 yr Thanks @itimpi , I have played in SLES in the past using the halt.local and after.local functionality. However, on shutdown (halt.local), I always ran into that timing issue of where in the shutdown process it executed and it was always later in the shutdown sequence than would have ever done me any good, which is why I asked. Ended up just creating some daemon processes that a clean shutdown would tackle. NOTE: Not that there is any issues I have today during shutdown that Unraid is not already taking care of for me. Edited September 27, 20196 yr by cybrnook
October 8, 20196 yr After many months of usage, I realized today, that the user scripts seem to run in parallel (see image attached). As I do have scripts that need to run after each other, how can I force that? Many thanks in advance.
October 8, 20196 yr So I build my own Daily, Weekly, Hourly scripts? Ah, I see. Thought User Scripts would work that way. Will do it. NowI do understand why my M.2 NVMs report high temperatures in the night. No good idea to start approx. six daily scripts at once. Thanks. Edited October 8, 20196 yr by hawihoney
October 9, 20196 yr 22 hours ago, hawihoney said: So I build my own Daily, Weekly, Hourly scripts? I think it's more that you create and schedule one script, and that script calls all the others one after another. Or you could apply a custom schedule to your scripts and have them run - say - 30 minutes apart.
October 9, 20196 yr I did use User Scripts because I was under a wrong Impression. I thought if there are catagories (Daily, ...) the Plugin would call all Scripts of the same category in order - one after another and not all at once. BTW, why would one call a bunch of Daily Scripts at once?
October 9, 20196 yr Author Probably because I'd then be inundated with requests to specify an execution order [emoji6] That, and people are leveraging this plugin to do things I never considered. Sent from my NSA monitored device
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.