apache2.2.0でhttpd.confの編集
httpd.confなどのフルパスを毎回書くのが面倒なのでつくりました。
basedirは環境にあわせて変更してください。
apachectlのパスは通していなければ実行部分を変更してください。
#!/bin/sh basedir="/usr/local/apache2/conf" if [ "$1" = '--help' ] ; then echo "usage: $0 [(filetype)] [r]" exit fi case $1 in u) f="$basedir/extra/httpd-userdir.conf" shift ;; v) f="$basedir/extra/httpd-vhosts.conf" shift ;; *) f="$basedir/httpd.conf" ;; esac vi $f if [ "$1" = 'r' ] ; then apachectl restart echo "apache restarted." fi