Results 1 to 2 of 2
hi,
I have following init script which works fine when i trigger it manually but doesn't start my python script on bootup, why not? I put it in /etc/init.d/ and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-21-2012 #1Just Joined!
- Join Date
- Jun 2010
- Location
- Planet Earth
- Posts
- 4
[BusyBox] init script
hi,
I have following init script which works fine when i trigger it manually but doesn't start my python script on bootup, why not? I put it in /etc/init.d/ and called it S99gateway
Any clues or suggestions? Help is appreciated!Code:# cat /etc/init.d/S95gateway #!/bin/sh # start() { echo 'Starting SemiosNET gateway' /usr/bin/python /root/gateway.py > /dev/null & } stop() { echo 'stopping SemiosNET gateway' killall -KILL python } ### main logic ### case "$1" in start) start ;; stop) stop ;; status) status FOO ;; restart|reload|condrestart) stop start ;; *) echo $"Usage: $0 {start|stop|restart|reload|status}" exit 1 esac exit 0
Thank you!
Ron
- 06-22-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,664
is /usr not mounted yet?
in the script, try output to a log file for later examination, e.g.:
if that is not it, then are you sure that the script is getting called (by rc.sysinit or whatever) with the "start" argument?Code:/usr/bin/python /root/gateway.py > /tmp/gateway.log 2>&1 &
as a test, you can do something like this, at the bottom of the script:
Code:*) # echo $"Usage: $0 {start|stop|restart|reload|status}" # exit 1 #testing... echo "No args given, but starting up anyway!" sleep 1 start ;; esac


Reply With Quote
