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.

Attempting to write a script to run yamj

Featured Replies

Can you help me with this.  My goal is to create a script that will run yamj as nobody then add a cronjob that will run that scipt.  The script will be named indexscript.sh

I created a directory called my_extra to place the script in.  Here is what I have tried

#!/bin/bash

sudo -u nobody /boot/extra/yamj-rescan.sh

and

su - nobody --shell=usr/bin/bash

/boot/extra/yamj-rescan

 

then I ran this command to establish the permissions

 

chmod a+rwx /boot/my_extra/indexscript.sh

 

 

 

Neither script worked when I tried to run it in a telnet session.  Can you please look at it and tell me why the script will not work?

 

Here is the what I am adding to my goscript:

crontab -l > /tmp/file; echo '#Run Yamj-rescan at 1am every day' >> /tmp/file; echo '00 1 * * * /boot/my_extra/indexscript.sh >/dev/null 2>&1' >>/tmp/file; crontab /tmp/file; rm /tmp/file

 

Thanks in advance for you time

 

  • Author

Does amyone have any input?  Since I moved to 5rc8 I found running yamj-rescan as root causes me issues, so I am looking to automate running yamj-rescan as nobody.

 

I really appreciate any help provided getting this script working.

did you try to run the sudo command directly in your telnet session?

do you see any errors?

sudo -u nobody /boot/extra/yamj-rescan.sh

should work, if the permissions of yamj-rescan.sh are correct. (the user nobody (or the group users) must have permission to read and execute it)

 

try

chmod 777 /boot/extra/yamj-rescan.sh

  • Author

Yes I ran the pseudo-command from putty and it worked

  • Author

The only way I can run the following command:

su - nobody --shell=usr/bin/bash

 

hit "enter

then run this command:

/boot/extra/yamj-rescan

 

yamj-rescan runs fine

 

So my script reads like this:

 

su - nobody --shell=usr/bin/bash

 

/boot/extra/yamj-rescan

 

Is my script missing anything?

 

 

Archived

This topic is now archived and is closed to further replies.

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.