Skip to content
This repository
Newer
Older
100644 72 lines (64 sloc) 1.942 kb
47ab43d0 » racke
2001-03-14 Debian packaging files added
1 #! /bin/sh -e
2 #
3 # interchange.init - Interchange start-stop script
4 #
5 # Copyright (C) 2000 Stefan Hornburg <racke@linuxia.de>
6
7 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
8 DAEMON=/usr/sbin/interchange
9 NAME=interchange
10 DESC="Interchange Server"
11
12 test -f $DAEMON || exit 0
13
14 # modes that Interchange uses
15 # possible values are
16 # --unix Unix mode only (default)
17 # --inetmode Internet mode only
18 # --unix --inetmode Unix and Internet mode
19 MODE="--unix"
20 USER=interchange
21 . /etc/interchange/init.cfg
22
23 case "$1" in
24 start)
25 echo -n "Starting $DESC: "
26 start-stop-daemon --start --quiet --pidfile /var/run/interchange/$NAME.pid \
27 --chuid $USER --exec $DAEMON -- --serve $MODE \
28 -f /etc/interchange/interchange.cfg
29 ;;
30 stop)
31 echo -n "Stopping $DESC: "
32
33 start-stop-daemon --stop --oknodo --pidfile /var/run/interchange/$NAME.pid
34 echo "$NAME."
35 ;;
36 #reload)
37 #
38 # If the daemon can reload its config files on the fly
39 # for example by sending it SIGHUP, do it here.
40 #
41 # If the daemon responds to changes in its config file
42 # directly anyway, make this a do-nothing entry.
43 #
44 # echo "Reloading $DESC configuration files."
45 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
46 # /var/run/$NAME.pid --exec $DAEMON
47 #;;
48 restart|force-reload)
49 #
50 # If the "reload" option is implemented, move the "force-reload"
51 # option to the "reload" entry above. If not, "force-reload" is
52 # just the same as "restart".
53 #
54
55 echo -n "Restarting $DESC: "
56 start-stop-daemon --stop --pidfile /var/run/interchange/$NAME.pid
57 echo "$NAME."
58 sleep 1
59
60 start-stop-daemon --start --quiet --pidfile /var/run/interchange/$NAME.pid \
61 --chuid $USER --exec $DAEMON -- --serve $MODE \
62 -f /etc/interchange/interchange.cfg
63 ;;
64 *)
65 N=/etc/init.d/$NAME
66 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
67 echo "Usage: $N {start|stop|restart|force-reload}" >&2
68 exit 1
69 ;;
70 esac
71
72 exit 0
Something went wrong with that request. Please try again.