[Plugin] CA User Scripts


Recommended Posts

@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?

Link to comment
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

Link to comment
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

Link to comment
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. 

Link to comment

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. 

Link to comment
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
Link to comment
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?

Link to comment
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.****

Link to comment

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"

 

Link to comment
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

Link to comment

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

Link to comment
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
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.