From: cantor Date: Tue, 14 Aug 2007 19:04:11 +0000 (+0000) Subject: Fixed a comment in redhat script, added Debian script. X-Git-Tag: 2.4~793 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fsp.git;a=commitdiff_plain;h=863e1d18457eb6bccf0637432dfc840a94da7c14 Fixed a comment in redhat script, added Debian script. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2415 cb58f699-b61c-0410-a6fe-9272a202ed29 --- diff --git a/configs/Makefile.am b/configs/Makefile.am index 4b2f134..7919cac 100644 --- a/configs/Makefile.am +++ b/configs/Makefile.am @@ -10,6 +10,7 @@ varrundir = $(localstatedir)/run pkgsysconfdir = $(sysconfdir)/@PACKAGE@ pkgsysconf_DATA = \ shibd-redhat \ + shibd-debian \ apache.config \ apache2.config \ apache22.config @@ -70,6 +71,9 @@ apache22.config: ${srcdir}/apache22.config.in Makefile ${top_builddir}/config.st shibd-redhat: ${srcdir}/shibd-redhat.in Makefile ${top_builddir}/config.status $(MAKE) do-build-file FILE=$@ +shibd-debian: ${srcdir}/shibd-debian.in Makefile ${top_builddir}/config.status + $(MAKE) do-build-file FILE=$@ + shibd.logger: ${srcdir}/shibd.logger.in Makefile ${top_builddir}/config.status $(MAKE) do-build-file FILE=$@ @@ -115,6 +119,7 @@ CLEANFILES = \ apache2.config \ apache22.config \ shibd-redhat \ + shibd-debian \ shibd.logger \ native.logger \ shibboleth2.xml \ @@ -133,4 +138,5 @@ EXTRA_DIST = \ apache2.config.in \ apache22.config.in \ shibd-redhat.in \ + shibd-debian.in \ $(CONFIGFILES) diff --git a/configs/shibd-debian.in b/configs/shibd-debian.in new file mode 100644 index 0000000..c043f19 --- /dev/null +++ b/configs/shibd-debian.in @@ -0,0 +1,85 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: shibd +# Required-Start: $local_fs $remote_fs $network +# Required-Stop: $local_fs $remote_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: S 0 1 6 +# Short-Description: Shibboleth 2 Service Provider Daemon +# Description: Starts the separate daemon used by the Shibboleth +# Apache module to manage sessions and to retrieve +# attributes from Shibboleth Identity Providers. +### END INIT INFO +# +# Written by Quanah Gibson-Mount +# Modified by Lukas Haemmerle for Shibboleth 2 +# Based on the dh-make template written by: +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DESC="Shibboleth 2 daemon" +NAME=shibd +SHIB_HOME=/opt/shibboleth-sp +SHIB_ETC=$SHIB_HOME/etc/shibboleth +SHIBSP_CONFIG=$SHIB_ETC/shibboleth2.xml +LD_LIBRARY_PATH=$SHIB_HOME/lib +DAEMON=$SHIB_HOME/sbin/$NAME +SCRIPTNAME=/etc/init.d/$NAME +PIDFILE=/var/run/$NAME.pid +DAEMON_OPTS="" + +# Force removal of socket +DAEMON_OPTS="$DAEMON_OPTS -f" + +# Use defined configuration file +DAEMON_OPTS="$DAEMON_OPTS -c $SHIBSP_CONFIG" + +# Specify pid file to use +DAEMON_OPTS="$DAEMON_OPTS -p $PIDFILE" + +# Exit if the package is not installed. +[ -x "$DAEMON" ] || exit 0 + +# Read configuration if it is present. +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Get the setting of VERBOSE and other rcS variables. +[ -f /etc/default/rcS ] && . /etc/default/rcS + +case "$1" in +start) + # Don't start shibd if NO_START is set. + if [ "$NO_START" = 1 ] ; then + echo "Not starting $DESC (see /etc/default/$NAME)" + exit 0 + fi + echo -n "Starting $DESC: " + start-stop-daemon --background --start --quiet \ + --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; +stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." + ;; +restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + sleep 1 + start-stop-daemon --background --start --quiet \ + --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; +*) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 \ No newline at end of file diff --git a/configs/shibd-redhat.in b/configs/shibd-redhat.in index 059e3d5..e8e9774 100644 --- a/configs/shibd-redhat.in +++ b/configs/shibd-redhat.in @@ -3,10 +3,10 @@ # Startup script for the Shibboleth Service Provider Daemon # # chkconfig: - 98 02 -# description: Shibboleth Service Provider Daemon +# description: Shibboleth 2 Service Provider Daemon # processname: shibd # pidfile: @-VARRUNDIR-@/shibd.pid -# config: @-PKGSYSCONFDIR-@/shibboleth.xml +# config: @-PKGSYSCONFDIR-@/shibboleth2.xml # Source function library. . /etc/rc.d/init.d/functions