2013-03-03 19:45:36 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-08-24 13:05:38 +02:00
|
|
|
SHIBD_USER=shibd
|
|
|
|
SHIBD_WAIT=30
|
|
|
|
SHIBD_PID=/var/run/shibboleth/shibd.pid
|
|
|
|
|
|
|
|
DAEMON_OPTS="-f -u $SHIBD_USER -g $SHIBD_USER -w $SHIBD_WAIT -p $SHIBD_PID"
|
|
|
|
|
2013-03-03 19:45:36 +01:00
|
|
|
shibd_start() {
|
2015-08-24 13:05:38 +02:00
|
|
|
if [ -f $SHIBD_PID ]; then
|
|
|
|
echo "The shibd service is already running"
|
|
|
|
else
|
|
|
|
echo "Starting the shibd service: /usr/sbin/shibd"
|
|
|
|
/usr/sbin/shibd $DAEMON_OPTS -p $SHIBD_PID
|
|
|
|
fi
|
2013-03-03 19:45:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
shibd_stop() {
|
|
|
|
echo "Stoping the shibd service: /usr/sbin/shibd"
|
|
|
|
killall shibd
|
|
|
|
}
|
|
|
|
|
|
|
|
shibd_restart() {
|
|
|
|
shibd_stop
|
|
|
|
sleep 1
|
|
|
|
shibd_start
|
|
|
|
}
|
|
|
|
|
|
|
|
shibd_configtest() {
|
|
|
|
/usr/sbin/shibd -t
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
'start')
|
|
|
|
shibd_start
|
|
|
|
;;
|
|
|
|
'stop')
|
|
|
|
shibd_stop
|
|
|
|
;;
|
|
|
|
'restart')
|
|
|
|
shibd_restart
|
|
|
|
;;
|
|
|
|
'configtest')
|
|
|
|
shibd_configtest
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 start|stop|restart|configtest"
|
|
|
|
;;
|
|
|
|
esac
|