-
Notifications
You must be signed in to change notification settings - Fork 0
Start script at boot
Alex Simon edited this page May 14, 2016
·
4 revisions
#!/bin/sh /etc/rc.common
START=99
STOP=15
boot() {
# launch the python script
python my_script.py &
}
start() {
echo start
# commands to launch application
}
stop() {
echo stop
# commands to kill application
}
restart() {
# launch the python script
python my_script.py &
}
IMPORTANT: make sure you use absolute path to my_script.py
mv initScript /etc/init.d/
chmod +x /etc/init.d/initScript
/etc/init.d/initScript enable
for F in /etc/init.d/* ; do $F enabled && echo $F on || echo $F **disabled**; done