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

So digging this latest update. Creat/delete/modify all from a webpage interface. Nice!!!

  • 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

On 06/04/2017 at 2:59 AM, Squid said:

Edit Script will open up a new spot at the bottom of the page where you can edit the script.

 

I'm having a couple of issues with the editing feature, I'm not able to consistently reproduce them but both things happened more than once:

 

-after editing one scrip and canceling without any changes the previous script appears when I editing a different script

-the + is removed from one my scripts in the date variable, (date '+%Y%m%d') becomes (date ' %Y%m%d') in all instances in the script

 

If I find a way of consistently reproducing this I'll post again.

 

  • Author
2 hours ago, johnnie.black said:

 

I'm having a couple of issues with the editing feature, I'm not able to consistently reproduce them but both things happened more than once:

 

-after editing one scrip and canceling without any changes the previous script appears when I editing a different script

-the + is removed from one my scripts in the date variable, (date '+%Y%m%d') becomes (date ' %Y%m%d') in all instances in the script

 

If I find a way of consistently reproducing this I'll post again.

 

 

Here's the consistent way to reproduce:

 

Edit a script, make a change, then cancel

Edit a different script.  The first script will still be there.  Fixed

 

The + sign thingy:  Fixed

  • 2 weeks later...

Minor bug:

When you hover over the name of a script and click "edit name", the pop-up menu doesn't collapse automatically (like it does for the other options)

If you click on "edit name" again in this state, code snippets are being added to the name box. Each click adds more code.

Edited by Jorgen
spelling

  • Author
7 hours ago, Jorgen said:

Minor bug:

When you hover over the name of a script and click "edit name", the pop-up menu doesn't collapse automatically (like it does for the other options)

If you click on "edit name" again in this state, code snippets are being added to the name box. Each click adds more code.

Good catch.  Fixed

  • 2 weeks later...

Possible Bug, possible user error:

 

Was testing out rsync with this and made a super simplistic script called "rsync test". I told it to run in the background and had set it to run every minute while testing. When I got done testing, I deleted the script and forgot about it for a few days. Today I rebooted the server and later manually clicked mover, now every minute I have “Jun 2 16:45:01 YES-MEDIASERVER root: User Scripts: /boot/config/plugins/user.scripts/scripts/rsync test/script not found” popping up in the log file. Though, User Scripts no long has the script, so looks like it wasn’t completely removed.

 

 

EDIT:

Was mistaken, checked the actual sys log and found that it had been running ever since the reboot this morning. Found the cron job for the deleted script was still listed in...

/boot/config/plugins/user.scripts/customSchedule.cron

So it looks like when I deleted the script it didn't remove the cron entry.

Edited by ryoko227

  • Author
3 hours ago, ryoko227 said:

Possible Bug, possible user error:

 

Was testing out rsync with this and made a super simplistic script called "rsync test". I told it to run in the background and had set it to run every minute while testing. When I got done testing, I deleted the script and forgot about it for a few days. Today I rebooted the server and later manually clicked mover, now every minute I have “Jun 2 16:45:01 YES-MEDIASERVER root: User Scripts: /boot/config/plugins/user.scripts/scripts/rsync test/script not found” popping up in the log file. Though, User Scripts no long has the script, so looks like it wasn’t completely removed.

 

 

EDIT:

Was mistaken, checked the actual sys log and found that it had been running ever since the reboot this morning. Found the cron job for the deleted script was still listed in...

/boot/config/plugins/user.scripts/customSchedule.cron

So it looks like when I deleted the script it didn't remove the cron entry.

The message was by design.  To let you know that the script wasn't found.  The plugin cannot update the cron when the script is manually deleted.  But, I now see how this can mess people up, especially with rapid cron schedules, so I've switched it to suppress the message.

Is there a way to re-order the scripts listed? I have a couple of scripts that I often run and honestly my list is getting larger and larger and it might be a little nice to group together some how. 

  • Author
The message was by design.  To let you know that the script wasn't found.  The plugin cannot update the cron when the script is manually deleted.  But, I now see how this can mess people up, especially with rapid cron schedules, so I've switched it to suppress the message.

It's sorted alphabetically by the folder name. Rename the folders as you choose then rename via the hover to whatever you want

Sent from my LG-D852 using Tapatalk

Hey, I need some help.

 

When I want to install the plugin I get error: plugin: bad file MD5

8 minutes ago, GreX said:

Hey, I need some help.

 

When I want to install the plugin I get error: plugin: bad file MD5

Possibly a bad download or maybe even a corrupt flash drive. Post diagnostics.

  • Author
32 minutes ago, GreX said:

Hey, I need some help.

 

When I want to install the plugin I get error: plugin: bad file MD5

 

23 minutes ago, trurl said:

Possibly a bad download or maybe even a corrupt flash drive. Post diagnostics.

Nope.  Its my fault...  I did an update this morning and updated the md5, but forgot to update the version number.  My bad...  And I didn't even have a beer.  (But probably not enough coffee)  Should be good now...  

 

depression-treatment-centers.jpg

It works! thanks for all your work! :) 

16 hours ago, Squid said:

The message was by design.  To let you know that the script wasn't found.  The plugin cannot update the cron when the script is manually deleted.  But, I now see how this can mess people up, especially with rapid cron schedules, so I've switched it to suppress the message.

Oh no worries Squid, I actually liked that the message was there. It let me know that something wasn't 100% on par. I was more curious if the plug-in was supposed to clear out the custom cron listing, or if I had borked something along the way, lol. Thank you for clearing that up for me though ^_^v

  • Author
9 hours ago, ryoko227 said:

Oh no worries Squid, I actually liked that the message was there. It let me know that something wasn't 100% on par. I was more curious if the plug-in was supposed to clear out the custom cron listing, or if I had borked something along the way, lol. Thank you for clearing that up for me though ^_^v

The message was there for that reason.  But, after seeing what you did and then thinking about how you would stop the message from appearing, the solution was counter intuitive:  You would have to go into the plugin (the deleted script wouldn't be listed), and to stop the message you would have to make a change somewhere to the schedule for something else and apply those changes.

 

Makes more sense to simply suppress the message.

  • Author
1 hour ago, dlandon said:

Can the icons on the right be lined up horizontally?

593d26f5d29d4_UserScripts.png.e81f26c6f1ef5ebd74d00d0c2ce2a110.png

Looks like its the same thing its the same thing as your dashboard bunching together issue, as it only happens on my system when the display is less than ~1100 px.  I'll wait to see what changes in the CSS happen on other versions.  (The blank space is reserved for the custom cron schedule)

30 minutes ago, Squid said:

Looks like its the same thing its the same thing as your dashboard bunching together issue, as it only happens on my system when the display is less than ~1100 px.  I'll wait to see what changes in the CSS happen on other versions.  (The blank space is reserved for the custom cron schedule)

That's weird.  I'm at 1280.

41 minutes ago, dlandon said:

That's weird.  I'm at 1280.

Can you change the below in the default-azure.css file (see styles folder)

#template{min-width:1080px;max-width:100%;margin:0}

to

#template{min-width:1280px;max-width:100%;margin:0}

Let me know if it improves your situation.

56 minutes ago, bonienl said:

Can you change the below in the default-azure.css file (see styles folder)


#template{min-width:1080px;max-width:100%;margin:0}

to


#template{min-width:1280px;max-width:100%;margin:0}

Let me know if it improves your situation.

No change.

  • Author

From a PM...  Edited to remove certain details

 

Quote

Hi Squid, I've written a bash script that will xxxxxxxxxxxxxxx to the flash drive where unRAID 6.4 can use them:
(link removed)

 

It works fine when I run it in the background via the User Scripts, but I really need it to run when the array starts. Unfortunately, when I do that the array hangs until I kill the script's process.  

 

Is there a reason the User Scripts plugin isn't loading this in the background when I set it to run "at startup of array"? Could that be an option?

 

Thanks!

 

It's because of the inotifywait.

 

When running at array_start, the script has to finish.  In this case, the inotifywait sits there and waits for whatever trigger(s) you're setting, and the script won't complete until that trigger is hit.

 

What I would do is create another script set to run at array start.  And have that script set to call your script like this:

 

echo "/path/to/the/actual/script.sh" | at NOW -M > /dev/null 2>&1

This will create another background process that'll run the real script.

 

When manually running in the background, userscripts automatically does this.  The process is a little different during array_start/stop, and the hourly / daily / monthly schedules, and scripts run in order one at a time, and must execute to completion.

 

Edited by Squid

On 6/11/2017 at 7:18 AM, dlandon said:

Can the icons on the right be lined up horizontally?

593d26f5d29d4_UserScripts.png.e81f26c6f1ef5ebd74d00d0c2ce2a110.png

 

Works fine in rc4.

What's the possibility of adding the ability to edit the go script from the scripts page?  It'd be a nice one stop shop for making adjustments then!

  • Author
What's the possibility of adding the ability to edit the go script from the scripts page?  It'd be a nice one stop shop for making adjustments then!

Use CA cfg file editor plugin

Sent from my LG-D852 using Tapatalk

5 minutes ago, Squid said:


Use CA cfg file editor plugin

Sent from my LG-D852 using Tapatalk
 

 

DOH! I actually had that already installed too.....

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.