2
# $Id: rsplib-registrar.init 2682 2012-06-08 11:29:28Z dreibh $
3
# --------------------------------------------------------------------------
5
# //===// //===== //===// // // //===//
6
# // // // // // // // // //
7
# //===// //===== //===// // // //===<<
8
# // \\ // // // // // //
9
# // \\ =====// // //===== // //===// Version II
11
# ------------- An Efficient RSerPool Prototype Implementation -------------
13
# Copyright (C) 2002-2012 by Thomas Dreibholz
15
# This program is free software: you can redistribute it and/or modify
16
# it under the terms of the GNU General Public License as published by
17
# the Free Software Foundation, either version 3 of the License, or
18
# (at your option) any later version.
20
# This program is distributed in the hope that it will be useful,
21
# but WITHOUT ANY WARRANTY; without even the implied warranty of
22
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
# GNU General Public License for more details.
25
# You should have received a copy of the GNU General Public License
26
# along with this program. If not, see <http://www.gnu.org/licenses/>.
28
# Contact: dreibh@iem.uni-due.de
32
# Provides: rsplib-registrar
33
# Required-Start: $local_fs $remote_fs $network $syslog
34
# Required-Stop: $local_fs $remote_fs $network $syslog
35
# Default-Start: 2 3 4 5
37
# Short-Description: RSerPool Registrar
38
# Description: This service provides a RSerPool Registrar.
42
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
44
DESC="RSerPool Registrar"
45
PIDFILE=/var/run/$NAME.pid
46
DAEMON=/usr/bin/rspregistrar
47
DAEMON_ARGS="-quiet -daemonpidfile=$PIDFILE -logfile=/var/log/$NAME.log -loglevel=3 -logcolor=off"
49
test -x $DAEMON || exit 0
52
# Make sure that SCTP is available
53
modprobe sctp > /dev/null 2>&1
54
# sysctl net.sctp.addip_enable=1
55
# sysctl net.sctp.auth_enable=1
58
# Include rsplib defaults if available
59
if [ -f /etc/default/rsplib-registrar ] ; then
60
. /etc/default/rsplib-registrar
63
# Load the VERBOSE setting and other rcS variables
66
# Define LSB log_* functions.
67
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
68
# and status_of_proc is working.
69
. /lib/lsb/init-functions
76
echo -n "Starting $DESC: "
77
start-stop-daemon --start --pidfile $PIDFILE \
78
--exec $DAEMON -- $DAEMON_ARGS
82
echo -n "Stopping $DESC: "
83
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
88
start-stop-daemon --stop --test --quiet --pidfile \
89
$PIDFILE --exec $DAEMON \
94
echo -n "Restarting $DESC: "
95
start-stop-daemon --stop --quiet --pidfile \
96
$PIDFILE --exec $DAEMON
98
start-stop-daemon --start --quiet --pidfile \
99
$PIDFILE --exec $DAEMON -- $DAEMON_ARGS
103
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
107
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2