nl85@almond.cit.cornell.edu:/infra/fedora/prod/apache> cat start*
#!/bin/ksh
apachectl=/infra/fedora/sys/apache/bin/apachectl
config=/infra/fedora/prod/apache/conf/httpd.conf
start="sudo $apachectl start -f $config"
stop="sudo $apachectl stop -f $config"
graceful="sudo $apachectl graceful -f $config"
restart="sudo $apachectl restart -f $config"
configtest="$apachectl configtest -f $config"
help=0
if (( $# == 1 ))
then
if [[ ( $1 != "start" ) && ( $1 != "stop" ) && ( $1 != "graceful" ) && ( $1 != "restart" ) && ( $1 != "configtest" ) ]]
then
help=1
else
req=$1
eval "echo \"\$${req}\"" | read oper
$oper
fi
else
help=1
fi
if (( help ))
then
printf "\nSyntax:"
for req in start stop graceful restart configtest
do
eval "echo \"\$${req}\"" | read oper
printf "\t%s %s\n\t\twill execute:\n\t\t%s\n\n" $0 $req "$oper"
done
fi
|