/
sfcb.init-redhat.in
70 lines (63 loc) · 1.11 KB
/
sfcb.init-redhat.in
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
#!/bin/bash
#
# $Id: sfcb.init-redhat.in,v 1.2 2005/06/13 12:50:33 mihajlov Exp $
#
# chkconfig: 35 20 80
#
# description: Small Footprint CIM Broker Service
#
# processname: sfcbd
#
# config: @sysconfdir@/sfcb/sfcb.cfg
# Source function library.
. /etc/init.d/functions
echo $PATH | grep -q @sbindir@ ||PATH=@sbindir@:$PATH
if [ -z "$LD_LIBRARY_PATH" ] || echo $LD_LIBRARY_PATH | grep -qv @libdir@
then
LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
fi
start() {
echo -n "Starting sfcb: "
daemon @sbindir@/sfcbd -d &&
touch /var/lock/subsys/sfcb &&
return 0 ||
return 1
}
stop() {
echo -n "Shutting down sfcb: "
killproc sfcbd &&
rm -f /var/lock/subsys/sfcb &&
return 0 || return 1
}
reload() {
echo -n "Reloading sfcb configuration: "
killproc sfcbd -HUP &&
return 0 || return 1
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status sfcbd
;;
restart)
stop
start
;;
reload)
reload
;;
condrestart)
[ -f /var/lock/subsys/sfcb ] && restart || :
;;
*)
echo "Usage: sfcb {start|stop|status|reload|restart|condrestart}"
exit 1
;;
esac
exit $?