Thanks, I will start using rc.shutdown more often :)
Craig Skinner wrote:
Tomas wrote:
Hi list,
Watching the thread about startup script I thought of a question
about shutdown script. Is it necessary to shutdown certain services
when machine goes down? Like for example mysql, dovecot, clamav,
amavis or openvpn. I've never saw anybody do that. Lots of people on
their manuals, tutorials or posts writes how to start mysql, but none
of then writes a shutdown script. So maybe it is not so necessary?
(But then again, mysql is a database engine, and databases should be
handle with care).
$ man rc.shutdown
Up to you. I shut down almost all daemons in it. Again, you can call
your own scripts, e.g:
echo -n ' mailman'
/usr/local/lib/mailman/bin/mailmanctl -q stop
sleep 30
echo -n ' mailgraph'
/usr/local/site/sbin/mailgraphctl stop > /dev/null
echo -n ' squid'
/usr/local/sbin/squid -k shutdown
echo -n ' dovecot'
pkill dovecot
echo -n ' apache'
apachectl stop
echo -n ' postfix'
/usr/local/site/sbin/postfixctl stop
echo -n ' viagrad'
su -m _viagrad /usr/local/site/libexec/viagrad/viagrad stop
echo -n ' named'
rndc stop
echo '.'