Parameterize the script a bit.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 14 Aug 2007 19:21:59 +0000 (19:21 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 14 Aug 2007 19:21:59 +0000 (19:21 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2417 cb58f699-b61c-0410-a6fe-9272a202ed29

configs/shibd-debian.in

index c043f19..903da88 100644 (file)
 PATH=/sbin:/bin:/usr/sbin:/usr/bin\r
 DESC="Shibboleth 2 daemon"\r
 NAME=shibd\r
-SHIB_HOME=/opt/shibboleth-sp\r
-SHIB_ETC=$SHIB_HOME/etc/shibboleth\r
-SHIBSP_CONFIG=$SHIB_ETC/shibboleth2.xml\r
-LD_LIBRARY_PATH=$SHIB_HOME/lib\r
-DAEMON=$SHIB_HOME/sbin/$NAME\r
+SHIB_HOME=@-PREFIX-@\r
+SHIBSP_CONFIG=@-PKGSYSCONFDIR-@/shibboleth2.xml\r
+LD_LIBRARY_PATH=@-PREFIX-@/lib\r
+DAEMON=@-PREFIX-@/sbin/$NAME\r
 SCRIPTNAME=/etc/init.d/$NAME\r
 PIDFILE=/var/run/$NAME.pid\r
 DAEMON_OPTS=""\r
@@ -58,22 +57,22 @@ start)
     fi\r
     echo -n "Starting $DESC: "\r
     start-stop-daemon --background --start --quiet \\r
-        --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS\r
+        --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS\r
     echo "$NAME."\r
     ;;\r
 stop)\r
     echo -n "Stopping $DESC: "\r
-    start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \\r
+    start-stop-daemon --stop --quiet --pidfile $PIDFILE \\r
         --exec $DAEMON\r
     echo "$NAME."\r
     ;;\r
 restart|force-reload)\r
     echo -n "Restarting $DESC: "\r
-    start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \\r
+    start-stop-daemon --stop --quiet --pidfile $PIDFILE \\r
         --exec $DAEMON\r
     sleep 1\r
     start-stop-daemon --background --start --quiet \\r
-        --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS\r
+        --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS\r
     echo "$NAME."\r
     ;;\r
 *)\r
@@ -82,4 +81,4 @@ restart|force-reload)
     ;;\r
 esac\r
 \r
-exit 0
\ No newline at end of file
+exit 0\r