Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugin] CA User Scripts

Featured Replies

@Squid

 

I know at one time you mentioned how to do this, but I figured I'd ask since I can't find it. 

 

Currently I have several scripts that I have sitting in my User.Script folder and I'm purging a bunch that I don't use any more and of course I'm saving them else where so I can review the code I wrote. What I want to do is rename my scripts so I can find them easier in the User.Script section, but I don't remember where you rename them since User.Scripts is not listing them by Alpha more or less just listing them, but however means it does. I know you can rename them from the Web Interface, but I want them to be sort-able or group-able by name so I don't have to look thru a bunch of scripts. 

 

I could of sworn you said to use SSH and find the files and rename them there and they would re-appear in User.Scripts by the new name or something of that sort. 

 

Advice, Concerns or Comments?

  • Replies 2.1k
  • Views 567.1k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I could make up something long, convoluted, and technical as a reason why it doesn't do that but it would all be bs.  The simple answer is that when I did this, I never thought of that, and why it sti

  • Hi All - We have a fix and are publishing a Connect plugin update to fix it today. Thanks for letting us know.

  • @Squid I tried many commands and by that I found out that pkill does not kill (all) child processes: root@Thoth:/tmp# pgrep -f isleep2m | xargs --no-run-if-empty ps fp PID TTY STAT T

Posted Images

  • Author

/boot/config/plugins/user.scripts/scripts/....  You can do over the network.

I did rename some of the folders, but when I visit User.Plugins the name shown in the script list is still the old name. 

Is there a way to refresh the listing?

3 minutes ago, kizer said:

I did rename some of the folders, but when I visit User.Plugins the name shown in the script list is still the old name. 

Is there a way to refresh the listing?

I made a similar request:

 

 

  • Author
2 minutes ago, kizer said:

Is there a way to refresh the listing?

Reload the page.  Renaming the folders will change the "sort order".  If you've already set a different name for it, then that name remains.  (You can either rename them via the UI or by editing /scripts/scriptName/name

I don't mind Renaming or digging around to find the files to rename. I was just trying to figure out how to do it even if I have to manually do it. :P

10 minutes ago, Squid said:

Reload the page.  Renaming the folders will change the "sort order".  If you've already set a different name for it, then that name remains.  (You can either rename them via the UI or by editing /scripts/scriptName/name

 

Ok, now we are on to something. Found the name file and I'm tinkering with it some more. xD

 

This is a rough way of doing it, but I think this will work. Thanks @Squid

  • Author
49 minutes ago, kizer said:

This is a rough way of doing it

Polite way of saying "Get off your ass on do the coding change?"

1 minute ago, Squid said:

Polite way of saying "Get off your ass on do the coding change?"

 

Polite way of saying it sucks I have to do it this way, but it serves my lazy needs and it'll have to do until you get off your butt. Lol

 

Nah if you made some changes it would be nice, but your saving us all so much work with this script anything you do is gravy. 

However if we are talking requests or even Far out there requests for Improvements I'd like the following: 

1. Ability to Re-arrange Scripts via screen.

2. Ability to check a box that says. "Disable if Parity Check/Rebuild running" for each individual script. Or have them all Disabled by Default and you check a box to allow during Parity/Rebuild

3. Ability to group scripts. Utilities, Media, Security or whatever else we'd like to tag a group. Basically a Label over a few scripts so they are easy to find in a big list. 

  • Author
11 minutes ago, kizer said:

1. Ability to Re-arrange Scripts via screen.

ok  Started thinking about it today.

 

11 minutes ago, kizer said:

2. Ability to check a box that says. "Disable if Parity Check/Rebuild running" for each individual script. Or have them all Disabled by Default and you check a box to allow during Parity/Rebuild

Tomorrow ok for you?  Easy to add an inline variable to the script (think I have them documented in the OP) to do just that.  UI checkbox / whatnot would be in the same category as #1

11 minutes ago, kizer said:

3. Ability to group scripts. Utilities, Media, Security or whatever else we'd like to tag a group. Basically a Label over a few scripts so they are easy to find in a big list

https://www.youtube.com/watch?v=pUdhaDCvPWY

 

Edited by Squid

Lol, Wasn't expecting any action out of it today/tomarrow or the next day. Just figured you know how I like to suggest things just to make more work for you. :P

  • Author
15 hours ago, kizer said:

tomarrow

I'm on time :)  See 2nd Post

I was wondering if a new scheduling option can be added to run a script on system shutdown?    At the moment I do by a config/stop script but it would be nice to move this to something I can maintain via the GUI.

  • Author

There is no unRaid event for "Shutdown" .   Array Stopping (which the plugin supports) is your option here.

3 hours ago, Squid said:

There is no unRaid event for "Shutdown" .   Array Stopping (which the plugin supports) is your option here.

Thanks for that information - it explains why there is no such option.   I think I will have to continue to use a ‘stop’ file then.   I have some actions that I do not necessarily want to happen when the array stops if the system is then not going to shutdown.

 

Maybe I should be requesting that unRAID introduces a shutdown event?

On 3/31/2018 at 6:11 AM, Squid said:

I'm on time :)  See 2nd Post

 

I updated to the newest Plug-In via the updater and I don't see anything different in the Plug-in. 

 

Updating to the Latest Release of unRAID just in case there is a glitch there. 

 

*****Nope no incline check box or anything. I even added a new script just incase.****

  • Author

Instructions in the 2nd post on inlibe variables.  

3 hours ago, Squid said:

Instructions in the 2nd post on inlibe variables.  

 

Sorry didn't catch that. I was looking for a Check Box or something. Lol 

This will work just the same. I'll give it a try soon. 

 

Thanks like usual. 

Ok I added the 

#noParity=true Set to be try if the script is not allowed to run when a parity check / rebuild is in progress

 

To the top of my file. I ran it from User.Scripts and it appeared to run while I'm doing a Test parity Check. 

Does this Variable only work if its running from a Background or scheduled run?

Or is it simply I'm not doing it correctly? Lol

 

Random Test Code for the fun of it. 

#!/bin/bash
#noParity=true

echo "locking down Tv Shows"

 

  • Author
2 hours ago, kizer said:

Ok I added the 

#noParity=true Set to be try if the script is not allowed to run when a parity check / rebuild is in progress

 

To the top of my file. I ran it from User.Scripts and it appeared to run while I'm doing a Test parity Check. 

Does this Variable only work if its running from a Background or scheduled run?

Or is it simply I'm not doing it correctly? Lol

 

Random Test Code for the fun of it. 


#!/bin/bash
#noParity=true

echo "locking down Tv Shows"

 

If manually executing it, it really makes no sense to enforce the no Parity thing.  So its only valid on scheduled runs

True, I was attempting to insure if it works or doesn't work that's all. 

Thanks for the confirmation. :D

  • Author
7 minutes ago, kizer said:

True, I was attempting to insure if it works or doesn't work that's all. 

Thanks for the confirmation. :D

On a scheduled run, you'll see it logged in the syslog if it doesn't execute due to parity running.

Tried something else. I set it to run Every 5 Minutes and well, while running a parity check I received a Test message Every 5 Minutes when I was expecting absolute silence via email and Prowl which I both have setup as Notifications. 

 

#!/bin/bash
#noParity=true

/usr/local/emhttp/plugins/dynamix/scripts/notify -e "Testing the Message System 1" -d "$(date +%D-%H:%I) Testing the Message System 2" -i "normal" 

 

Not trying to be that guy, but I'm just trying to make sure I understand what is supposed to work and what isn't. Lol

  • Author
22 minutes ago, kizer said:

Not trying to be that guy, but I'm just trying to make sure I understand what is supposed to work and what isn't. Lol

Give yourself credit..  You are being "that guy".  Actually you found an issue that's been there for quite awhile where no inline variable would work on a custom scheduled script.

 

Check for updates.  (Also just to note, I can't detect when a check / rebuild is actually started.  Only once it gets rolling.  IE: during disk spinups etc the script will still run.

Edited by Squid

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.