3 # Provides: invirt-remote-server
4 # Required-Start: $local_fs $remote_fs
5 # Required-Stop: $local_fs $remote_fs
6 # Default-Start: 2 3 4 5
8 # Short-Description: Invirt remctl configuration filesystem
12 # Author: Invirt project <invirt@mit.edu>
14 PATH=/sbin:/usr/sbin:/bin:/usr/bin
15 NAME=invirt-remote-server
16 DESC="the Invirt remctl configuration filesystem"
17 DAEMON=/usr/sbin/invirt-remconffs
18 DAEMON_ARGS="/etc/remctl/remconffs"
19 PIDFILE=/var/run/$NAME.pid
20 SCRIPTNAME=/etc/init.d/$NAME
21 GEN_FILES=/etc/remctl/acl/web
23 # Exit if the package is not installed
24 [ -x "$DAEMON" ] || exit 0
26 . /lib/init/gen-files.sh
27 . /lib/init/std-init.sh
32 # 0 if daemon has been started
33 # 1 if daemon was already running
34 # 2 if daemon could not be started
37 daemon --running -n $NAME && return 1
38 daemon -r -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
44 # 0 if daemon has been stopped
45 # 1 if daemon was already stopped
46 # 2 if daemon could not be stopped
47 # other if a failure occurred
48 daemon --stop -n $NAME
50 [ "$RETVAL" = 2 ] && return 2
51 # Many daemons don't delete their pidfiles when they exit.