February 24, 201313 yr 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?
February 24, 201313 yr 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.
February 24, 201313 yr 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?
February 26, 201313 yr 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 ?
February 26, 201313 yr 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.
February 26, 201313 yr 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.