MantisBT - WebSolarLog
View Issue Details
0000273WebSolarLog[All Projects] Generalpublic2014-08-24 14:542014-08-24 14:54
HyP3r 
 
normaltweakalways
newopen 
 
 
0000273: Start wsl.sh as Deamon
At the moment you start the wsl.sh script with rc.local:

sudo /usr/share/nginx/www/websolarlog/scripts/./wsl.sh start

It would be better to start the script as deamon with init:

-------------------
#!/bin/sh
### BEGIN INIT INFO
# Provides: websolarlog
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: WebSolarLog Server
### END INIT INFO

USER="www-data"
DIR="/usr/share/nginx/www/websolarlog/scripts"

###### WebSolarLog server start/stop script ######

case "$1" in
start)
su $USER -c "${DIR}/wsl.sh start"
;;
stop)
su $USER -c "${DIR}/wsl.sh stop"
;;
status)
su $USER -c "${DIR}/wsl.sh status"
;;
*)
echo "Usage: {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0
-------------------

You only have to place this file in /ect/init.d and run update-rc.d websolarlog defaults.

Don't forget write this here down: http://www.websolarlog.com/index.php/installation-manual-for-websolarlog/ [^]
No tags attached.
Issue History
2014-08-24 14:54HyP3rNew Issue

There are no notes attached to this issue.