starting daemons at server start
David Fleck
david.fleck at mchsi.com
Sun Jan 4 12:52:52 PST 2004
On Sun, 4 Jan 2004, Micke P wrote:
> Examples of this script(working :-))?
>$ cat /usr/local/etc/rc.d/apache.sh
#!/bin/sh
case "$1" in
start)
[ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl start > /dev/null && echo 'apache: start'
;;
stop)
[ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop > /dev/null && echo ' apache: stop'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0
works on my system (4.9).
--
David Fleck
david.fleck at mchsi.com
More information about the freebsd-questions
mailing list