simple bash scripting help
ok, this is what i got:
#start of script
startapache)
if [ -e /var/run/pid ]; then
echo apache is allready running
else
/etc/init.d/httpd start
fi
;;
and it gives a command like this: ./script startapache
but i want to do ./script apache start
how do i do this?
is it like this?
#start of script
apache)
start)
/etc/init.d/httpd start
;;
stop)
/etc/init.d/httpd stop
;;
;;
if i do this, i just won't run. what am i doing wrong?
|