apconf-conv.sh 282 B

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