> Hello,
> I've just installed v. 4.2. Attempts at shutting down via 'shutdown'
> command
> produces the following message -
> 'Shutting down daemon processes: You still seem to have old-style rc.d
> scripts: /usr/local/etc/rc.d/nwserv.sh /usr/local/etc/rc.d/opennmap.sh
> /usr/local/etc/rc.d/pipsecd.sh /usr/local/etc/rc.d/sendfiled.sh
> /usr/local/etc/rc.d/yaunc.sh Please change them to recognize the "Stop"
> option'
> Now, I am in a quandary, not knowing what code these files are supposed
> to contain. Any suggestion etc. .... welcomed or better yet a copy of
> those files.
> Thanks
> -- Joe --
u just need a script that can start and stop
ie:
script start => start the daemon
script stop => stop the daemon
here is a sample for /usr/local/etc/rc.d/squid.sh
gw# cat squid.sh
#!/bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
case "$1" in
start)
if [ -x ${PREFIX}/sbin/squid -a -f
${PREFIX}/etc/squid/squid.conf ]; then
(cd /${PREFIX}/squid/logs; ${PREFIX}/sbin/squid
Quote:>/dev/null 2>&1 &) ; echo -n ' squid'
fi
;;
stop)
${PREFIX}/sbin/squid -k shutdown 2>&1
# Uncomment this if you'd like the system to (attempt to
# wait for) squid to shut down cleanly
#echo "Sleeping for 45 seconds to allow squid to
shutdown.."
#sleep 45
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0