-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit
executable file
·71 lines (62 loc) · 1.17 KB
/
init
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
#
# moncli Start/Stop Moncli.
#
# chkconfig: - 62 38
# description: Moncli is a metric transport and evaluation daemon.
#
# processname: moncli
#
# By: Jelle Smet
#
#
#
# Source function library
#. /etc/init.d/functions
# Get network config
#. /etc/sysconfig/network
PYTHON_EXEC='/usr/bin/python'
MONCLI_EXEC='/opt/moncli/bin/moncli'
RETVAL=0
start() {
echo -n $"Starting Moncli: "
# Start me up!
$PYTHON_EXEC $MONCLI_EXEC start --host besrvup-sss01 --local_repo /opt/moncli/lib/repository --cache /opt/moncli/var/moncli.cache --pid /opt/moncli/var/moncli.pid
RETVAL=$?
echo
return $RETVAL
}
stop() {
echo -n $"Stopping Moncli: "
$PYTHON_EXEC $MONCLI_EXEC stop --host besrvup-sss01 --local_repo /opt/moncli/lib/repository --cache /opt/moncli/var/moncli.cache --pid /opt/moncli/var/moncli.pid
return $RETVAL
}
restart() {
stop
start
}
reload() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status instiki
;;
restart)
restart
;;
reload)
reload
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload}"
exit 1
esac
exit $?