wok diff partimage/stuff/etc/init.d/partimaged @ rev 10192
Up: wordpress to 3.1.2.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri May 20 22:52:56 2011 +0000 (2011-05-20) |
parents | |
children | ba5507fa22f8 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/partimage/stuff/etc/init.d/partimaged Fri May 20 22:52:56 2011 +0000 1.3 @@ -0,0 +1,61 @@ 1.4 +#!/bin/sh 1.5 +# /etc/init.d/unfsd : Start, stop and restart Partimage Server on SliTaz, at 1.6 +# boot time or with the command line. 1.7 +# 1.8 +# To start Partimage Server at boot time, just put Partimage in the $RUN_DAEMONS 1.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf 1.10 +# 1.11 +. /etc/init.d/rc.functions 1.12 +. /etc/daemons.conf 1.13 + 1.14 +NAME=partimaged 1.15 +DESC="Partimage Server" 1.16 +DAEMON=/usr/sbin/partimaged 1.17 +IMAGES_DIR=/var/lib/partimaged 1.18 +OPTIONS="-D -d ${IMAGES_DIR}" 1.19 +PIDFILE=/var/run/$NAME.pid 1.20 + 1.21 + 1.22 +test -f $DAEMON || exit 0 1.23 + 1.24 + 1.25 + 1.26 +case "$1" in 1.27 + start) 1.28 + if [ -f $PIDFILE ] ; then 1.29 + echo "$NAME already running." 1.30 + exit 1 1.31 + fi 1.32 + 1.33 + check_conf 1.34 + echo -n "Starting $DESC: $NAME... " 1.35 + $DAEMON $OPTIONS 1.36 + status 1.37 + 1.38 + # registering PID 1.39 + if [ $? -eq 0 ]; then 1.40 + pidof -s $NAME > $PIDFILE 1.41 + fi 1.42 + ;; 1.43 + stop) 1.44 + if [ ! -f $PIDFILE ] ; then 1.45 + echo "$NAME is not running." 1.46 + exit 1 1.47 + fi 1.48 + echo -n "Stopping $DESC: $NAME... " 1.49 + kill `cat $PIDFILE` 1.50 + rm -f $PIDFILE 1.51 + status 1.52 + ;; 1.53 + restart) 1.54 + $0 stop 1.55 + $0 start 1.56 + ;; 1.57 + *) 1.58 + echo "Usage: $DAEMON {start|stop|reload|restart}" 1.59 + exit 1 1.60 + ;; 1.61 +esac 1.62 + 1.63 +exit 0 1.64 +