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

i did some screenshots,so you see what i mean... 

123.png

1234.png

12345.png

  • Replies 2.1k
  • Views 567.3k
  • 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
21 hours ago, nuhll said:

ö ä ü ß ?

I would think that rsync used for usb backup should be able to handle any valid linux filename, but to be honest, I've never checked with non-English filenames.

I guess could be only reason? I mean, plugin still shows the names of the scripts, but theres nothing in it. They were running for months without problems... tehy just were never backed up... :(

Edited by nuhll

Yea, it seems to be a problem with ö ä ß and so on, i cant even delete the scripts from the interface.

 

How can i get rid of the undeltable wrong scripts? i would just readd them with other names.

Edited by nuhll

You should be able to go to the command line and delete them using wildcards. Or move all the others to another folder then delete the folder.

Yep, did work, i was in the wrong folder.. xD

Is it possible to run a script as the CA User Scripts user/program?

I want to setup PlexDrive through it, but it requires a one time input from the user (client id stuff and then a dynamically generated code which I have to enter)

 

More info:

I used wget to download the linux-amd64 release of PlexDrive 5.0.0, and in the terminal executed the PlexDrive with parameters to test if my commands were gonna work. They did.

Now apperently setting up (running the same commands) PlexDrive through CA User Scripts requires me to log in again, as Google sees it as a different "app".

 

Edit:

In short, which user is the CA User Scripts user?

 

Edit 2:

Odd, when I run id -un through CA User Scripts, it shows root.
Seems like I need to somehow bash into CA User Scripts or something like that.

Edited by Arndroid

41 minutes ago, Arndroid said:

Odd, when I run id -un through CA User Scripts, it shows root.

 

Basically everything in unRAID runs as root. The other "users" are only for network access to shared folders with SMB, NFS, AFP.

2 hours ago, trurl said:

 

Basically everything in unRAID runs as root. The other "users" are only for network access to shared folders with SMB, NFS, AFP.

Hmm, alright. But then why does PlexDrive require a different Google OAuth?

Is it because it runs from a bash script though CA User Scripts or something?

 

Edit:

I think I figure out why... My bad.

Edited by Arndroid

Hi everyone, 

I am using this to run a number of scripts on my Backup unraid server to rsync content from my main server at array startup. 

 

Is there a way to have the scripts run in sequential order, rather than all at once? 

 

-Brett

  • Author
13 hours ago, Brettv said:

Is there a way to have the scripts run in sequential order, rather than all at once? 

 

Have one script that runs that then calls the other scripts in order (and also don't have rsync run as a daemon)

Does anyone have any tips on the correct syntax in order to do that? I would google it, but i thought there might be something specific or something already tailored for unraid. 

ie the correct syntax for "if X is still running, wait until finished, then start Y"

 

 

So i think i figured it out...

You just put them on a new line... pretty simple hey. 

is there any way to stop? I click abort, but it keeps running

  • Author

Stop scripts stops execution after the current command being executed is finished.  If the command takes forever to finish (or never does), then effectively the stop command does nothing.

Stop scripts stops execution after the current command being executed is finished.  If the command takes forever to finish (or never does), then effectively the stop command does nothing.

Okay so only way to stop is force reboot of unRAID


Sent from my iPhone using Tapatalk Pro

Couldn't you drop to a shell/prompt and use the Linux commands of ps and kill ?

19 minutes ago, BRiT said:

Couldn't you drop to a shell/prompt and use the Linux commands of ps and kill ?

sorry noob here. How would I go about doing this?

5 hours ago, DZMM said:

is it possible to run python scripts?  I'm trying to run this script https://gist.github.com/JonnyWong16/2607abf0e3431b6f133861bbe1bb694e which starts with:

 


#!/usr/bin/env python

Thanks

Do not forget that python is not included in the standard unRAID distribution.     You would therefore have to install python (typically done via the Nerd Pack plugin) to be able to run the script.

I had python installed - it's falling over when the script https://gist.github.com/JonnyWong16/2607abf0e3431b6f133861bbe1bb694e is trying to install some modules at the start:

 

import requests
import xmltodict
from plexapi.server import PlexServer

I'll do some googling later to learn how to use pip or whatever to install the modules within the script

Looking for some advice on a script I've added (which i believe runs successfully) as unsure where the parsing issue is. 

 

Seeing a lot of the below in syslog:

Aug 23 16:48:01 Tower crond[1440]: failed parsing crontab for user root: /usr/local/emhttp/plugins/user.scripts/startCustom.php /boot/config/plugins/user.scripts/scripts/copy_pibackup_to_Backup_share/script > /dev/null 2>&1

This is the script:

#!/bin/bash
/usr/bin/rsync -aPX /mnt/cache/pibackup.img /mnt/user/Backup/

Name of user script, description and custom cron:

Capture.thumb.JPG.37ccc950b3adfeaa128d32f6c220df8e.JPG

 

cheers

30 minutes ago, sketchy said:

Looking for some advice on a script I've added (which i believe runs successfully) as unsure where the parsing issue is. 

 

Seeing a lot of the below in syslog:


Aug 23 16:48:01 Tower crond[1440]: failed parsing crontab for user root: /usr/local/emhttp/plugins/user.scripts/startCustom.php /boot/config/plugins/user.scripts/scripts/copy_pibackup_to_Backup_share/script > /dev/null 2>&1

This is the script:


#!/bin/bash
/usr/bin/rsync -aPX /mnt/cache/pibackup.img /mnt/user/Backup/

Name of user script, description and custom cron:

Capture.thumb.JPG.37ccc950b3adfeaa128d32f6c220df8e.JPG

 

cheers

Isn’t the custom field at the end meant to have 5 values rather than 4?

1 hour ago, itimpi said:

Isn’t the custom field at the end meant to have 5 values rather than 4?

 

Aha, good spot @itimpi. That may be what the parsing error was complaining about. I'll put another asterisk on the end for the 'day of week' requirement, see how it likes that!

 

Edit: Looks like that cleared the issue. Cheers @itimpi

Edited by sketchy
In post

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.