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.

Go script questions

Featured Replies

After a reboot, i want to do some specific stuff. I want to replace some files, start a custom daemon, start svnserve etc.

My idea was to place those things in the go script:

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
/boot/unmenu/uu
cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c 
svnserve -d
/usr/bin/python /boot/custom/kuroautomode.py start
cp /mnt/cache/Temp/apcupsd/* /etc/apcupsd
cp /mnt/cache/Temp/checksubs.sh /etc/cron.daily 
/boot/custom/install_spinup.sh

but only everything upto and including the 'svnserve -d' command is actually executed, everything after that seems to be ignored...

if i run those commands manually, they do work, but why not from within the go script?

After a reboot, i want to do some specific stuff. I want to replace some files, start a custom daemon, start svnserve etc.

My idea was to place those things in the go script:

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
/boot/unmenu/uu
cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c 
svnserve -d
/usr/bin/python /boot/custom/kuroautomode.py start
cp /mnt/cache/Temp/apcupsd/* /etc/apcupsd
cp /mnt/cache/Temp/checksubs.sh /etc/cron.daily 
/boot/custom/install_spinup.sh

but only everything upto and including the 'svnserve -d' command is actually executed, everything after that seems to be ignored...

if i run those commands manually, they do work, but why not from within the go script?

probably because python does not exist at the time the script is executed.
  • Author

Ah ok... so the go script will not be able to execute the (python) daemon, crashes, and stops right there, so the copy commands are skipped?

Is there another way of doing something like this?

Could i delay those commands using the 'at' command, like

/usr/bin/python /boot/custom/kuroautomode.py start | at now + 1 minute

Or should i look for another place to do 'post' startup stuff like this?

  • Author

Anyone?

Ehm... what about if you write  little script that first waits a couple of minutes and then launches what you want to launch... And then launch the script in the go file with an & after so it starts in a another session.. Would that not work ?

Ah ok... so the go script will not be able to execute the (python) daemon, crashes, and stops right there, so the copy commands are skipped?

Is there another way of doing something like this?

Could i delay those commands using the 'at' command, like

/usr/bin/python /boot/custom/kuroautomode.py start | at now + 1 minute

Or should i look for another place to do 'post' startup stuff like this?

Yes, you should look elsewhere... AND that is not the correct syntax for the "at" command regardless.

 

If you are using a fairly recent 5.0 beta/rc release...

See this post

http://lime-technology.com/forum/index.php?topic=26201.msg228957#msg228957

but substitute

disks_mounted

everywhere it has stopping_services

 

In other words, your startup command script would be copied from your flash drive and made executable to

/usr/local/emhttp/plugins/start-stuff/event/disks_mounted

by a few lines added to your config/go script as described in the other post.

 

  • Author

Thanks Joe, i'll give it a try. I understand from your description that the actual disks are not yet mounted when the go script is executed, i did not know that. Explains a lot.

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.