forked from Villaz/vcycle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvcycled.init
More file actions
executable file
·51 lines (45 loc) · 788 Bytes
/
vcycled.init
File metadata and controls
executable file
·51 lines (45 loc) · 788 Bytes
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
48
49
50
51
#!/bin/bash
#
# vcycled Start and stop vcycled
#
# chkconfig: 345 98 02
# description: vcycled is a VM lifecyle manager
# Source function library.
. /etc/init.d/functions
start() {
[ "$EUID" != "0" ] && exit 1
[ -x /var/lib/vcycle/bin/vcycled ] || exit 2
# Start daemon
echo -n $"Starting vcycled: "
daemon /var/lib/vcycle/bin/vcycled
RETVAL=$?
echo
return $RETVAL
}
stop() {
[ "$EUID" != "0" ] && exit 3
# Stop daemon
echo -n $"Shutting down vcycled: "
killproc vcycled
RETVAL=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status vcycled
;;
restart|force-reload|reload)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|status|restart|force-reload|reload}"
exit 4
esac