blob: d6b8e9f2ec98d310e2b33b071d0fda4d69160d3e (
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
46
47
48
|
#!/bin/bash
#
# cloudmasterd: Init script for Cloud daemon.
#
# chkconfig: - 91 03
#
# description: Deamon for creating cloud machines in an genome framework
# processname: cloudmasterd
# config: /etc/cloudmasterd/config.yml
#
# Source function library.
. /etc/init.d/functions
CTL=cloudmasterd-ctl
[ -z "$HOME" ] && export HOME=/
case "$1" in
start)
echo -n $"Starting cloudmasterd: "
rm /var/tmp/cloudmasterd.lock &> /dev/null
/usr/bin/cloudmasterd-sync &
$CTL start
touch /var/lock/subsys/cloudmasterd
RETVAL=$?
;;
stop)
echo -n $"Stopping cloudmasterd: "
pkill -f cloudmasterd-sync
rm -rf /var/lock/subsys/cloudmasterd
$CTL stop
RETVAL=$?
;;
restart|reload)
$0 stop
$0 start
;;
status)
$CTL status
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload}"
RETVAL=1
esac
exit $RETVAL
|