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