Running on Ubuntu Karmic. I need to execute the following (updated) script at boot time
#!/bin/sh
# /etc/init.d/scripts
# Description: Starts Python scripts
# ————————————————–
#
### BEGIN INIT INFO
# Provides: Scripts
# Required-Start: $network $local_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start Python scripts to provide mapping services
### END INIT INFO
case $1 in
start)
# echo -n ¨Starting Mapping service: ¨
/usr/local/bin/liteserv.py /home/myUN/bin/mapnik/my_osm.xml --caching --debug=False
;;
stop)
# echo -n ¨Stoping Mapping service: ¨
/usr/local/bin/liteserv.py /home/myUN/bin/mapnik/my_osm.xml --caching --debug=False
;;
restart)
# echo -n ¨Retarting Mapping service: ¨
/usr/local/bin/liteserv.py /home/myUN/bin/mapnik/my_osm.xml --caching --debug=False
;;
*)
# echo ¨Usage: scripts {start|stop|restart}¨
exit 1
esac
Have placed it into /etc/init.d Registered it with
sudo update-rc.d scripts defaults
But nothing happens on boot. I have tried looking in the logs but I can't find anything. Both scripts and liteserv.py are marked as executable.
As per Andy Smith's response, When I run:
/etc/init.d/scripts start
I now get the program running correctly (after correcting the bad quotes).
However, it still does not run the program on bootup.
sudo update-rc.d scripts default
(without thes
)?/etc/init.d/scripts start
?