Last change
on this file since 835 was
808,
checked in by price, 16 years ago
|
use host/xvm-2 for writing svn repo from web
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/usr/bin/pagsh -e |
---|
2 | # |
---|
3 | # Apache kstart wrapper by anders. |
---|
4 | # |
---|
5 | |
---|
6 | SCRIPT=/etc/init.d/apache2.invirt-orig |
---|
7 | KSTART_PIDFILE=/var/run/k5start-apache2.pid |
---|
8 | KSTART_KEYTAB=/etc/apache2/keytab |
---|
9 | INSTANCE=xvm-2.mit.edu |
---|
10 | |
---|
11 | export AFSCELL=sipb.mit.edu |
---|
12 | |
---|
13 | kstart_start () { |
---|
14 | TMP_PIDFILE=$(mktemp /tmp/k5start-apache2.pid-XXXXXX) |
---|
15 | chown www-data "$TMP_PIDFILE" |
---|
16 | export KRB5CCNAME=$(mktemp /tmp/krb5cc_33.kstart-XXXXXX) |
---|
17 | chown www-data $KRB5CCNAME |
---|
18 | /sbin/start-stop-daemon --start --pidfile "$TMP_PIDFILE" -c www-data \ |
---|
19 | --exec /usr/bin/k5start -- -b -p "$TMP_PIDFILE" \ |
---|
20 | -f "$KSTART_KEYTAB" -K10 -u daemon -i "$INSTANCE" -S afs -I sipb.mit.edu -t -b |
---|
21 | cat "$TMP_PIDFILE" >|"$KSTART_PIDFILE" |
---|
22 | rm -f "$TMP_PIDFILE" |
---|
23 | } |
---|
24 | kstart_stop () { |
---|
25 | if [ -e $KSTART_PIDFILE ]; then |
---|
26 | /sbin/start-stop-daemon --stop --pidfile $KSTART_PIDFILE |
---|
27 | rm -f $KSTART_PIDFILE |
---|
28 | else |
---|
29 | echo -n " ... no kstart pidfile" |
---|
30 | fi |
---|
31 | } |
---|
32 | |
---|
33 | case "$1" in |
---|
34 | start) |
---|
35 | echo -n "Starting kstart for Apache2: k5start" |
---|
36 | kstart_start |
---|
37 | echo "." |
---|
38 | exec "$SCRIPT" start |
---|
39 | ;; |
---|
40 | stop) |
---|
41 | "$SCRIPT" stop |
---|
42 | echo -n "Stopping kstart for Apache2: k5start" |
---|
43 | kstart_stop |
---|
44 | echo "." |
---|
45 | ;; |
---|
46 | restart|force-reload) |
---|
47 | "$0" stop |
---|
48 | sleep 1 |
---|
49 | "$0" start |
---|
50 | ;; |
---|
51 | *) |
---|
52 | exec "$SCRIPT" "$@" |
---|
53 | ;; |
---|
54 | esac |
---|
Note: See
TracBrowser
for help on using the repository browser.