4 # Required-Start: $local_fs $remote_fs $network $syslog openafs-client
5 # Required-Stop: $local_fs $remote_fs $network $syslog openafs-client
6 # Default-Start: 2 3 4 5
8 # Short-Description: Start/stop apache2 web server
11 # Apache kstart wrapper by anders.
14 SCRIPT=/etc/init.d/apache2.invirt-orig
15 KSTART_PIDFILE=/var/run/k5start-apache2.pid
16 KSTART_KEYTAB=/etc/invirt/keytab
18 export AFSCELL=sipb.mit.edu
21 TMP_PIDFILE=$(mktemp /tmp/k5start-apache2.pid-XXXXXX)
22 chown www-data "$TMP_PIDFILE"
23 export KRB5CCNAME=$(mktemp /tmp/krb5cc_33.kstart-XXXXXX)
24 chown www-data $KRB5CCNAME
25 /sbin/start-stop-daemon --start --pidfile "$TMP_PIDFILE" -c www-data \
26 --exec /usr/bin/k5start -- -b -p "$TMP_PIDFILE" \
27 -U -f "$KSTART_KEYTAB" -K10 -S afs -I "$AFSCELL" -t -b
28 cat "$TMP_PIDFILE" >|"$KSTART_PIDFILE"
32 if [ -e $KSTART_PIDFILE ]; then
33 /sbin/start-stop-daemon --stop --pidfile $KSTART_PIDFILE
36 echo -n " ... no kstart pidfile"
42 echo -n "Starting kstart for Apache2: k5start"
49 echo -n "Stopping kstart for Apache2: k5start"