consumer.init.j2 870 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
#!/bin/bash
# argo-{{ item.key | lower }}-consumer daemon
# chkconfig: 345 20 80
# description: argo-{{ item.key | lower }}-consumer daemon
# processname: argo-{{ item.key | lower }}-consumer

. /etc/rc.d/init.d/functions
PROG_NAME="argo-{{ item.key | lower }}-consumer"
CONFIG="/etc/argo-{{ item.key | lower }}-consumer/consumer.conf"
10
DAEMON_PATH="/usr/bin/argo-{{ item.key | lower }}{% if item.key|lower != "egi" %}-wrapper{% endif %}-consumer.py"
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

case "$1" in
start)
	echo -n $"Starting $PROG_NAME: "
	daemon $DAEMON_PATH --start --config $CONFIG
	echo
;;
status)
	$DAEMON_PATH --status --config $CONFIG
;;
stop)
	echo -n $"Stopping $PROG_NAME: "
	daemon $DAEMON_PATH --stop --config $CONFIG
	echo
;;
restart)
	echo -n $"Restarting $PROG_NAME: "
	daemon $DAEMON_PATH --restart --config $CONFIG
	echo
;;
*)
	echo "Usage: $0 {status|start|stop|restart}"
	exit 1
esac