diff --git a/debian/changelog b/debian/changelog index 4256edc..7f1a6e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +sanji-controller (1.0.1-5) unstable; urgency=low + + * Use start-stop-daemon to start the controller as a system daemon. + + -- Aeluin Chen Thu, 02 Jul 2015 09:48:21 +0800 + +sanji-controller (1.0.1-4) unstable; urgency=low + + * Update init script dependency. + + -- Aeluin Chen Thu, 18 Jun 2015 13:48:58 +0800 + sanji-controller (1.0.1-3) unstable; urgency=low * Sleep more longer (reconnect). diff --git a/debian/init b/debian/init index 59b08ef..4a9c0e1 100755 --- a/debian/init +++ b/debian/init @@ -3,7 +3,7 @@ # Provides: sanji-controller # Required-Start: $remote_fs $syslog $network # Required-Stop: $remote_fs $syslog $network -# Should-Start: bootmisc gpsd gpsc +# Should-Start: bootmisc # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Controller of Sanji framework @@ -12,11 +12,12 @@ SANJI_CONTROLLER=/usr/bin/sanji-controller SANJI_CONFIG=/etc/sanji-controller.conf -SANJI_OPTIONS="" +SANJI_OPTIONS="-f" case "$1" in start) - ${SANJI_CONTROLLER} ${SANJI_OPTIONS} -c ${SANJI_CONFIG} + start-stop-daemon --start --quiet --oknodo -b --exec \ + ${SANJI_CONTROLLER} -- ${SANJI_OPTIONS} -c ${SANJI_CONFIG} ;; stop) killall ${SANJI_CONTROLLER}