|
|
1.1 misho 1: #!/bin/sh
2:
3: if [ "$1" = "" ]; then
4: echo "Usage: $0 /somewhere/httpd.conf"
5: exit 1
6: fi
7:
8: if [ ! -w $1 ]; then
9: echo "You cannot write to $1"
10: exit 1
11: fi
12:
13: TMPFILE=tmpfile.$$
14:
15: awk -f conffix.awk <$1 >$TMPFILE
16:
17: if [ "$?" != 0 ]; then
18: exit 1
19: fi
20:
21: mv -f $1 $1.orig
22: mv -f $TMPFILE $1
23: exit 0
24: