~openstack-ubuntu-packagers/swift/diablo

« back to all changes in this revision

Viewing changes to debian/swift-account.swift-account-reaper

  • Committer: Soren Hansen
  • Date: 2011-07-13 08:37:00 UTC
  • Revision ID: soren@linux2go.dk-20110713083700-at1t83fcgfx1n0yg
Fix up some indentation in the init scripts, and finish adding status support to the rest of the init scripts (in the first go, I only looked at *.init)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
SWIFT_GRP=swift
20
20
PID_FILE=/var/run/swift/${SERVICE_NAME}.pid
21
21
PID_DIR=`dirname $PID_FILE`
22
 
  
 
22
 
23
23
if ! [ -x "${DAEMON}" ] ; then
24
24
        exit 0 
25
25
fi
28
28
        echo "No configuration file found in ${DAEMON_ARGS}: exiting"
29
29
        exit 0
30
30
fi
31
 
  
 
31
 
32
32
mkdir -p ${PID_DIR}
33
33
chown ${SWIFT_USER} ${PID_DIR}
34
34
 
36
36
 
37
37
case "$1" in
38
38
start)
39
 
        log_daemon_msg "Starting ${PRINT_NAME=}" "${SERVICE_NAME}"
 
39
        log_daemon_msg "Starting ${PRINT_NAME}" "${SERVICE_NAME}"
40
40
        start-stop-daemon --start --chuid ${SWIFT_USER}:${SWIFT_GRP} -b -m --pidfile $PID_FILE --exec ${DAEMON} -- ${DAEMON_ARGS}
41
41
        log_end_msg $?
42
42
;;
43
43
stop)
44
44
        log_daemon_msg "Stopping ${PRINT_NAME}" "${SERVICE_NAME}"
45
45
        start-stop-daemon --stop --oknodo --pidfile ${PID_FILE}
46
 
        log_end_msg $?                          
47
 
;;                    
 
46
        log_end_msg $?
 
47
;;
48
48
restart|force-reload|reload)
49
 
        $0 stop             
50
 
        sleep 1
51
 
        $0 start
52
 
;;              
 
49
        $0 stop
 
50
        sleep 1
 
51
        $0 start
 
52
;;
 
53
status)
 
54
        status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
 
55
;;
53
56
*)
54
 
        echo "Usage: $0 {start|stop|restart|reload|force-reload}"
55
 
        exit 1                                      
56
 
;;            
 
57
        echo "Usage: $0 {start|stop|restart|reload|force-reload}"
 
58
        exit 1
 
59
;;
57
60
esac
58
 
    
 
61
 
59
62
exit 0