File: init.d

package info (click to toggle)
popa3d 0.5.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 224 kB
  • ctags: 269
  • sloc: ansic: 2,132; sh: 86; makefile: 78
file content (46 lines) | stat: -rw-r--r-- 797 bytes parent folder | download
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
#! /bin/sh

test -f /usr/sbin/popa3d || exit 0

DAEMON=/usr/sbin/popa3d
NAME=popa3d
DEFAULT=/etc/default/popa3d
ARGS="-D"

#. /etc/default/popa3d

# Check for default file, if it is not there or it says no start
# then bomb out
# test -f $DEFAULT || exit 0
# grep -q -s 'RUN_STANDALONE=yes' $DEFAULT || exit 0

if [ -e /etc/default/popa3d ]; then
    . /etc/default/popa3d
    case $RUN_STANDALONE in
	yes|1|true)
	    ;;
	*)
	    exit 0
	    ;;
    esac
fi


case "$1" in
start|restart|force-reload)

  echo -n "Starting pop daemon: "
  start-stop-daemon --start --name popa3d --exec $DAEMON -- $ARGS
  echo $NAME
  ;;
stop)
  echo -n "Stopping pop daemon: "
  kill -9 `pidof popa3d`
  echo $NAME
  ;;
*)
  echo "Usage: /etc/init.d/popa3d {start|stop|restart|force-reload}"
  exit 1
esac

exit 0