Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 101 lines (90 sloc) 2.933 kB
b31a690 @jonjensen Move DEV_4_7_0 development branch to repository trunk.
jonjensen authored
1 #! /bin/sh -e
2 #
3 # interchange.init - Interchange start-stop script
4 #
60cb5cd @racke fixed GPG variable misnomers
racke authored
5 # Copyright (C) 2000,2001,2002,2003 Stefan Hornburg (Racke) <racke@linuxia.de>
6270e14 @racke merged changes 2.2 vs 2.2.2.1
racke authored
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public
18 # License along with this program; if not, write to the Free
19 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 # MA 02111-1307 USA.
b31a690 @jonjensen Move DEV_4_7_0 development branch to repository trunk.
jonjensen authored
21
22 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
23 DAEMON=/usr/sbin/interchange
24 NAME=interchange
25 DESC="Interchange Server"
26
27 test -f $DAEMON || exit 0
28
29 # modes that Interchange uses
30 # possible values are
31 # --unix Unix mode only (default)
32 # --inetmode Internet mode only
33 # --unix --inetmode Unix and Internet mode
34 MODE="--unix"
35 USER=interchange
36 . /etc/interchange/init.cfg
37
60cb5cd @racke fixed GPG variable misnomers
racke authored
38 if [ "$GPGHOME" ]; then
fd79b4d @racke Debian packages support the selection of the GnuPG home directory
racke authored
39 export GNUPGHOME=$GPGHOME
40 fi
41
b31a690 @jonjensen Move DEV_4_7_0 development branch to repository trunk.
jonjensen authored
42 case "$1" in
43 start)
3485ca0 @racke work in progress
racke authored
44 # skip start during unfinished installation
45 if [ -f /var/run/interchange-install ]; then
46 exit 0
47 fi
b31a690 @jonjensen Move DEV_4_7_0 development branch to repository trunk.
jonjensen authored
48 echo -n "Starting $DESC: "
49 start-stop-daemon --start --quiet --pidfile /var/run/interchange/$NAME.pid \
50 --chuid $USER --exec $DAEMON -- --serve $MODE \
51 -f /etc/interchange/interchange.cfg
52 ;;
53 stop)
d27c6e3 @racke small change in the restart logic
racke authored
54 # skip stop during unfinished installation
55 if [ -f /var/run/interchange-install ]; then
56 exit 0
57 fi
58
b31a690 @jonjensen Move DEV_4_7_0 development branch to repository trunk.
jonjensen authored
59 echo -n "Stopping $DESC: "
60
61 start-stop-daemon --stop --oknodo --pidfile /var/run/interchange/$NAME.pid
62 echo "$NAME."
63 ;;
64 #reload)
65 #
66 # If the daemon can reload its config files on the fly
67 # for example by sending it SIGHUP, do it here.
68 #
69 # If the daemon responds to changes in its config file
70 # directly anyway, make this a do-nothing entry.
71 #
72 # echo "Reloading $DESC configuration files."
73 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
74 # /var/run/$NAME.pid --exec $DAEMON
75 #;;
76 restart|force-reload)
77 #
78 # If the "reload" option is implemented, move the "force-reload"
79 # option to the "reload" entry above. If not, "force-reload" is
80 # just the same as "restart".
81 #
82
83 echo -n "Restarting $DESC: "
84 start-stop-daemon --stop --pidfile /var/run/interchange/$NAME.pid
85 echo "$NAME."
86 sleep 1
87
88 start-stop-daemon --start --quiet --pidfile /var/run/interchange/$NAME.pid \
89 --chuid $USER --exec $DAEMON -- --serve $MODE \
90 -f /etc/interchange/interchange.cfg
91 ;;
92 *)
93 N=/etc/init.d/$NAME
94 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
95 echo "Usage: $N {start|stop|restart|force-reload}" >&2
96 exit 1
97 ;;
98 esac
99
100 exit 0
Something went wrong with that request. Please try again.