File: swift-account.init

package info (click to toggle)
swift 2.2.0-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 7,652 kB
  • ctags: 8,973
  • sloc: python: 91,651; sh: 668; makefile: 49
file content (47 lines) | stat: -rw-r--r-- 1,085 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh
### BEGIN INIT INFO
# Provides:          swift-account
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Swift account server
# Description:       Account server for swift.
### END INIT INFO

#/usr/bin/swift-init account-server $1

SERVICE_NAME="account-server"
PRINT_NAME="account server"

. /lib/lsb/init-functions

if ! [ -x /usr/bin/swift-init ] ; then
	exit 0
fi

case "$1" in
start)
	log_daemon_msg "Starting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
	/usr/bin/swift-init ${SERVICE_NAME} start
	log_end_msg $?
;;   
stop)
	log_daemon_msg "Stopping Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
	/usr/bin/swift-init ${SERVICE_NAME} stop
	log_end_msg $?
;;
restart|force-reload|reload)
        log_daemon_msg "Restarting Swift ${PRINT_NAME}" "swift-init ${SERVICE_NAME}"
        /usr/bin/swift-init ${SERVICE_NAME} reload
;;
status)
        exec /usr/bin/swift-init ${SERVICE_NAME} status
;;
*)
	echo "Usage: $0 {start|stop|restart|reload}"
	exit 1
;;  
esac

exit 0