starting daemons at server start
Scott W
wegster at mindcore.net
Sun Jan 4 12:49:08 PST 2004
Micke P wrote:
>If there is something that is done automatically, I
>swear my karma is that it won't be done! I did do a
>port apache install. And right, I don't remember that
>being asked. I'm assuming there's an easier way to get
>this set up besides redoing the install.
>
>Examples of this script(working :-))?
>
>Micke
>
>
>
[wegster at freeb] /usr/local/etc/rc.d
[0] $ cat apache.sh
#!/bin/sh
case "$1" in
start)
[ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl
start > /dev/null && echo -n ' apache'
;;
stop)
[ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop >
/dev/null && echo -n ' apache'
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0
You'll have to check your locations of course, but the sample script
should arealy exist on your system. Run /etc/periodic/weekly/310.locate
cron and then:
locate apache.sh-dist
Scott
More information about the freebsd-questions
mailing list