File: shaperd.init

package info (click to toggle)
shaperd 0.2.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 276 kB
  • ctags: 320
  • sloc: cpp: 3,489; sh: 105; makefile: 82; ansic: 35
file content (44 lines) | stat: -rwxr-xr-x 757 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
#
# shaperd.init: startup script for redhat 6.x

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# Check that shaperd.conf exists.
[ -f /usr/local/shaperd/shaperd.conf ] || exit 0

# See how we were called.
case "$1" in
  start)
	echo -n "Starting shaperd: "
	/usr/local/shaperd/shaperd
	echo
	touch /var/lock/subsys/shaperd
	;;
  stop)
	echo -n "Shutting down shaperd: "
	killproc shaperd
	rm -f /var/lock/subsys/shaperd
	echo ""
	;;
  status)
	status shaperd
	;;
  restart)
	echo -n "Restarting shaperd: "
	$0 stop
	$0 start
	echo "done."
	;;
  *)
	echo "Usage: $0 {start|stop|restart|status}"
	exit 1
esac