- Timestamp:
- Jul 6, 2010, 12:27:26 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-dev/debian/invirt-dev.init
r2636 r3033 14 14 # Do NOT "set -e" 15 15 16 NAME=invirt-dev 16 NAME=invirtibuilder 17 DESC="the Invirt build daemon" 18 DAEMON="/usr/bin/$NAME" 19 PIDFILE="/var/run/$NAME.pid" 17 20 GEN_FILES=/srv/repository/conf/distributions 21 22 [ -x "$DAEMON" ] || exit 0 18 23 19 24 . /lib/init/std-init.sh … … 38 43 invirt-build-conf || ret=2 39 44 45 if [ "$ret" = 0 ]; then 46 # Return 47 # 0 if daemon has been started 48 # 1 if daemon was already running 49 # 2 if daemon could not be started 50 log_daemon_msg "Starting $DESC" "$NAME" 51 if daemon --running -n $NAME; then 52 log_daemon_msg "$NAME is already running!" 53 return 1 54 fi 55 daemon -r -O daemon.info -E daemon.err -n $NAME -U $DAEMON || return 2 56 fi 40 57 return $ret 41 58 } … … 43 60 do_stop() 44 61 { 45 : 62 # Return 63 # 0 if daemon has been stopped 64 # 1 if daemon was already stopped 65 # 2 if daemon could not be stopped 66 # other if a failure occurred 67 log_daemon_msg "Stopping $DESC" "$NAME" 68 daemon --stop -n $NAME 69 RETVAL="$?" 70 [ "$RETVAL" = 2 ] && return 2 71 # Many daemons don't delete their pidfiles when they exit. 72 # rm -f $PIDFILE 73 return "$RETVAL" 46 74 } 47 75 48 76 do_reload() 49 77 { 78 do_stop 50 79 do_start 51 80 }
Note: See TracChangeset
for help on using the changeset viewer.