File: cflowd

package info (click to toggle)
flowscan 1.006-12
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 752 kB
  • ctags: 184
  • sloc: sh: 2,770; perl: 1,518; makefile: 144
file content (42 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (5)
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

# rc script for cflowd 2.x
# D Plonka, May  3 1999

bindir=/usr/local/arts/sbin
logfile=/dev/null
conf=/usr/local/etc/cflowd.conf
user=net

su=/bin/su
nohup=/usr/bin/nohup
kill=/bin/kill
ps=/bin/ps
grep=/bin/grep
awk=/usr/bin/awk
nice=/usr/bin/nice
niceness=0

case "$1" in
'start')
	echo "starting cflowdmux"
	${nice} --${niceness} ${su} - ${user} -c "${bindir}/cflowdmux ${conf}"
	echo "starting cflowd"
	${nice} --${niceness} ${su} - ${user} -c "${bindir}/cflowd -s 300 -O 0 -m ${conf}"
	;;
 
'stop')
	echo "killing cflowd"
        pid=`${ps} ax |${grep} "${bindir}/[c]flowd " |${awk} '{print $1}'`
	if [ -n "$pid" ]
	then
	   ${kill} $pid
	fi

	echo "killing cflowdmux"
        pid=`${ps} ax |${grep} "${bindir}/[c]flowdmux " |${awk} '{print $1}'`
	if [ -n "$pid" ]
	then
	   ${kill} $pid
	fi
	;;
esac