Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Jan 2004 14:31:37 -0500
From:      Marty Landman <MLandman@face2interface.com>
To:        Micke P <mickep3@yahoo.com>, fbsd_user@a1poweruser.com, freebsd-questions@freebsd.org
Subject:   RE: starting daemons at server start
Message-ID:  <6.0.0.22.0.20040104142759.1111d578@pop.face2interface.com>
In-Reply-To: <20040104192156.86503.qmail@web14525.mail.yahoo.com>
References:  <MIEPLLIBMLEEABPDBIEGOEBGFDAA.fbsd_user@a1poweruser.com> <20040104192156.86503.qmail@web14525.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 02:21 PM 1/4/2004, Micke P wrote:

>I'm thinking primarily of starting apache and a dynamic ip updater 
>automatically at startup.

Micke, here's a sample from my machine that may help:

# ls -alh /usr/local/etc/rc.d
total 20
drwxr-xr-x  2 root  wheel  512B Dec 30 16:58 .
drwxr-xr-x  9 root  wheel  512B Dec  7 16:13 ..
-rwxr-x---  1 root  wheel  181B Dec 30 16:55 000.mysql-client.sh
-rwxr-xr--  1 root  wheel  144B Nov 12 16:18 001.landns.root.sh
-r-xr-xr--  1 root  pgsql  875B Nov 11 17:24 010.pgsql.sh
-rwxr-x--x  1 root  wheel  407B Nov 12 19:33 apache2.sh
-rwxr-xr-x  1 root  wheel    3K Nov 14 21:12 cups.sh.sample
-rwxr-x---  1 root  wheel  549B Dec 30 16:58 mysql-server.sh
-r-xr-xr-x  1 root  wheel  602B Nov 14 21:47 samba.sh.sample
# cat /usr/local/etc/rc.d/apache2.sh
#!/bin/sh
PREFIX=/usr/local

case "$1" in
start)
         [ "ssl" = "ssl" -a -f "$PREFIX/etc/apache2/ssl.crt/server.crt" ] 
&& SSL=ssl
         [ -x ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl 
start${SSL} > /dev/null && echo -n ' apache2'
         ;;
stop)
         [ -r /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > 
/dev/null && echo -n ' apache2'
         ;;
*)
         echo "Usage: `basename $0` {start|stop}" >&2
         ;;
esac

exit 0
Swami:



Marty Landman   Face 2 Interface Inc 845-679-9387
Sign On Required: Web membership software for your site
Make a Website: http://face2interface.com/Home/Demo.shtml



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.0.22.0.20040104142759.1111d578>