diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-06-18 12:05:17 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-06-18 12:05:17 +0200 |
commit | a8900d693e4ec6ca995aed5fbf4abb9a029f3ed0 (patch) | |
tree | a72aaa2d716fdae898515c4122a6df4f4b273fbd /etc | |
parent | 8783aac95bdba94c79beec79506482682a748f2b (diff) |
Update daemon.cc and add pidfile to miavd arguments.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/miavd.in | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/etc/miavd.in b/etc/miavd.in index f36330b..288b2a7 100644 --- a/etc/miavd.in +++ b/etc/miavd.in @@ -25,7 +25,7 @@ _LOG="@prefix@/var/log/$prog/$prog.log" _PID="@prefix@/var/run/$prog.pid" start() { -# [ "$EUID" != "0" ] && exit 4 + [ "$EUID" != "0" ] && exit 4 [ "$NETWORKING" = "no" ] && exit 1 [ -x "$_BIN" ] || exit 5 @@ -40,8 +40,7 @@ start() { fi export LD_LIBRARY_PATH=$_PREFIX/lib -# $_BIN --pidfile ${_PID} --config ${_CONF} -D +all --logfile ${_LOG} &> /dev/null - $_BIN --config ${_CONF} -D +all &> /dev/null + $_BIN --pidfile ${_PID} --config ${_CONF} -D +all &> /dev/null RETVAL=$? [ $RETVAL -eq 0 ] && success || failure echo @@ -51,11 +50,11 @@ start() { return $RETVAL } -#status() { -# [ -f $lockfile ] || return 3 -# status -p ${_PID} miavd -# status miavd -#} +status() { + [ -f $lockfile ] || return 3 + status -p ${_PID} miavd + status miavd +} stop() { echo -n $"$prog: Stopping miav server: " @@ -66,9 +65,8 @@ stop() { echo exit 4 fi -# [ "$EUID" != "0" ] && exit 4 -# kill -s INT $(cat ${_PID}) - killall -9 miavd + [ "$EUID" != "0" ] && exit 4 + kill -s INT $(cat ${_PID}) RETVAL=$? if [ $RETVAL -eq 0 ] then |