Skip to content

Commit

Permalink
Merge pull request #12 from lwindg/master
Browse files Browse the repository at this point in the history
Use start-stop-daemon as system service tool.
  • Loading branch information
lwindg committed Aug 14, 2015
2 parents 4f6edd0 + 0c5e3c8 commit af97a8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
12 changes: 12 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> Thu, 02 Jul 2015 09:48:21 +0800

sanji-controller (1.0.1-4) unstable; urgency=low

* Update init script dependency.

-- Aeluin Chen <[email protected]> Thu, 18 Jun 2015 13:48:58 +0800

sanji-controller (1.0.1-3) unstable; urgency=low

* Sleep more longer (reconnect).
Expand Down
7 changes: 4 additions & 3 deletions debian/init
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down

0 comments on commit af97a8b

Please sign in to comment.