blob: d0446cafa9a476b2558f757f5081d12a05b02fdb (
plain)
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
|
#!/bin/bash
#
# cloudmasterd: Init script for Cloud daemon.
#
# chkconfig: 35 91 03
#
# description: Deamon for creating cloud machines in an everest framework
#
#
#
# Source function library.
. /etc/init.d/functions
CTL=cloudmasterd-ctl
[ -z "$HOME" ] && export HOME=/
case "$1" in
start)
echo -n $"Starting cloudmasterd: "
`/usr/bin/cloudmasterd-sync > /var/log/cloudmasterd-sync.log &`
$CTL start
RETVAL=$?
;;
stop)
echo -n $"Stopping cloudmasterd: "
`pkill -f cloudmasterd-sync`
$CTL stop
RETVAL=$?
;;
restart)
$0 stop
$0 start
;;
status)
$CTL status
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
RETVAL=1
esac
exit $RETVAL
|