File: init

package info (click to toggle)
wnn 4.2-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 13,680 kB
  • ctags: 8,999
  • sloc: ansic: 85,573; makefile: 210; sh: 119; cpp: 87
file content (43 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
#
# /etc/init.d/wnn: start or stop Wnn jserver.

# Source Wnn configuration, if available

if [ -f /etc/wnn.conf ]; then
    . /etc/wnn.conf
else
    run_jserver=1
fi

# The following value is extracted by debstd to figure out how to generate
# the postinst script. Edit the field to change the way the script is
# registered through update-rc.d (see the manpage for update-rc.d!)

FLAGS="defaults 99 1"

test -x /usr/bin/Wnn4/jserver || exit 0

case "$1" in
  start)
    if [ $run_jserver = 1 ]; then
      start-stop-daemon --start --verbose --exec /usr/bin/Wnn4/jserver
    fi
    ;;
  stop)
    if [ $run_jserver = 1 ]; then
      start-stop-daemon --stop --verbose --exec /usr/bin/Wnn4/jserver
    fi
    ;;
  restart|force-reload)
    if [ $run_jserver = 1 ]; then
      start-stop-daemon --stop --verbose --exec /usr/bin/Wnn4/jserver
      start-stop-daemon --start --verbose --exec /usr/bin/Wnn4/jserver
    fi
    ;;
  *)
    echo "Usage: /etc/init.d/wnn {start|stop|restart|force-reload}"
    exit 1
esac

exit 0