Date: Tue, 7 Oct 1997 18:56:25 +0200 From: Ollivier Robert <roberto@keltia.freenix.fr> To: "'FreeBSD-ports'" <freebsd-ports@FreeBSD.ORG> Subject: Re: rc.shutdown Message-ID: <19971007185625.24185@keltia.freenix.fr> In-Reply-To: <01BCD31D.0BA36060@nemkoltd.nildram.co.uk>; from Ian Vaudrey on Tue, Oct 07, 1997 at 12:30:57PM %2B0100 References: <01BCD31D.0BA36060@nemkoltd.nildram.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
According to Ian Vaudrey: > Does anyone have a sample/skeleton script that respects `start' > and `stop' arguments that they don't mind sharing? Here is my news.sh: ------------------------------------------------------------ #! /bin/sh PATH=$PATH:/usr/local/news/etc:/usr/local/news/bin export PATH if [ X"$1" = Xstart ]; then echo '' su news -c rc.news fi if [ X"$1" = Xstop ]; then echo "" echo 'Stopping INN.' su news -c "ctlinnd shutdown 'Halted by news.sh stop'" fi ------------------------------------------------------------ and ssh.sh: ------------------------------------------------------------ #! /bin/sh SSHDIR=/etc/ssh PIDDIR=/var/run if [ X"$1" = Xstart ]; then if [ -f /usr/local/sbin/sshd -a -f $SSHDIR/sshd_config ]; then echo 'Starting sshd.' /usr/local/sbin/sshd fi fi if [ X"$1" = Xstop ]; then if [ -f $PIDDIR/sshd.pid ]; then echo 'Stopping sshd.' kill `cat $PIDDIR/sshd.pid` fi fi ------------------------------------------------------------ -- Ollivier ROBERT -=- FreeBSD: There are no limits -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 3.0-CURRENT #36: Sat Oct 4 19:58:34 CEST 1997
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971007185625.24185>