debian: add an option to diable wcs at boot
update-rc.d disable doesn't work properly and display an unreadable output
This commit is contained in:
parent
7229c2c10d
commit
fb5df20311
|
@ -28,19 +28,32 @@ then
|
|||
. /etc/default/$NAME
|
||||
fi
|
||||
|
||||
is_true() {
|
||||
if [ "x$1" = "xtrue" -o "x$1" = "xyes" -o "x$1" = "x0" ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service.
|
||||
#
|
||||
d_start() {
|
||||
if [ $CONFIG_FILE ]; then
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||||
--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background \
|
||||
--exec $DAEMON -- -f $CONFIG_FILE start $OPTIONS
|
||||
else
|
||||
start-stop-daemon --start --quiet --pidfile $pidfile \
|
||||
--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background \
|
||||
--exec $DAEMON -- start $OPTIONS
|
||||
fi
|
||||
if is_true "$START" ; then
|
||||
if [ $CONFIG_FILE ]; then
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE \
|
||||
--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background \
|
||||
--exec $DAEMON -- -f $CONFIG_FILE start $OPTIONS
|
||||
else
|
||||
start-stop-daemon --start --quiet --pidfile $pidfile \
|
||||
--chuid $WCS_USER:$WCS_GROUP --make-pidfile --background \
|
||||
--exec $DAEMON -- start $OPTIONS
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
echo "w.c.s. not configured to start, please edit /etc/default/wcs to enable"
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue