X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/04f98db0f938b6844f56f4507d97c2facd35c0a0..3a63409c4ba6ce339667ae68a638bed60c8a147c:/files/etc/init.d/apache2.invirt diff --git a/files/etc/init.d/apache2.invirt b/files/etc/init.d/apache2.invirt index 254508d..3a4d69b 100755 --- a/files/etc/init.d/apache2.invirt +++ b/files/etc/init.d/apache2.invirt @@ -13,7 +13,7 @@ SCRIPT=/etc/init.d/apache2.invirt-orig KSTART_PIDFILE=/var/run/k5start-apache2.pid -KSTART_KEYTAB=/etc/apache2/keytab +KSTART_KEYTAB=/etc/invirt/keytab export AFSCELL=sipb.mit.edu @@ -24,13 +24,19 @@ kstart_start () { chown www-data $KRB5CCNAME /sbin/start-stop-daemon --start --pidfile "$TMP_PIDFILE" -c www-data \ --exec /usr/bin/k5start -- -b -p "$TMP_PIDFILE" \ - -U -f "$KSTART_KEYTAB" -K10 -S afs -I "$AFSCELL" -t -b + -f "$KSTART_KEYTAB" -K10 -S afs -I "$AFSCELL" -t \ + "daemon/$(hostname -f)" cat "$TMP_PIDFILE" >|"$KSTART_PIDFILE" rm -f "$TMP_PIDFILE" } kstart_stop () { if [ -e $KSTART_PIDFILE ]; then /sbin/start-stop-daemon --stop --pidfile $KSTART_PIDFILE + pgrep apache2 >/dev/null && sleep 1 \ + && pgrep apache2 >/dev/null && sleep 1 \ + && pgrep apache2 >/dev/null && sleep 1 \ + && pgrep apache2 >/dev/null && sleep 1 \ + && pkill -9 apache2 rm -f $KSTART_PIDFILE else echo -n " ... no kstart pidfile"