~ubuntu-branches/ubuntu/precise/darkstat/precise

« back to all changes in this revision

Viewing changes to contrib/gentoo-init.d-script

  • Committer: Bazaar Package Importer
  • Author(s): Cédric Delfosse
  • Date: 2004-06-11 23:18:07 UTC
  • Revision ID: james.westby@ubuntu.com-20040611231807-n6inlmb4cs4yyi84
Tags: upstream-2.6
Import upstream version 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/sbin/runscript
 
2
#
 
3
# Gentoo startup script for darkstat
 
4
#
 
5
# ./configure with --prefix=/var/darkstat and copy this file to
 
6
# /etc/init.d/darkstat.  Don't forget to rc-update add darkstat.
 
7
#
 
8
# The ARGS should probably be specified in a file in /etc/conf.d
 
9
#
 
10
 
 
11
PIDFILE='/var/darkstat/darkstat.pid'
 
12
ARGS='-i eth0 -b 192.168.0.1 -n -l 192.168.0.0/255.255.255.0 --spy eth1'
 
13
 
 
14
depend() {
 
15
        need net
 
16
}
 
17
 
 
18
start() {
 
19
        ebegin "Starting darkstat"
 
20
        cd /var/darkstat
 
21
        start-stop-daemon --start --quiet --pidfile $PIDFILE \
 
22
                --startas /var/darkstat/sbin/darkstat -- $ARGS 2>&1 >/dev/null &
 
23
        eend $?
 
24
}
 
25
 
 
26
stop() {
 
27
        ebegin "Stopping darkstat"
 
28
        start-stop-daemon --stop --quiet --pidfile $PIDFILE
 
29
        eend $?
 
30
}
 
31