bootstrap/rc.d/rc.local_shutdown

48 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
# /etc/rc.d/rc.local_shutdown - Local system shutdown script.
# This script will be run when the system is shutdown or rebooted.
# Notify that the server is shutting down.
CONFIG_FILE="server" /opt/bin/pushover -T "${HOSTNAME%%.*}" -p 1 -m "Shutting down."
# Stop seeding the torrents.
[[ -x /etc/rc.d/rc.seeder ]] && /etc/rc.d/rc.seeder stop
# Stop the bandwidth bar generator.
[ -x /etc/rc.d/rc.bwbar ] && /etc/rc.d/rc.bwbar stop
# Stop rsyncd.
[ -x /etc/rc.d/rc.rsyncd ] && /etc/rc.d/rc.rsyncd stop
# Stop proftpd.
[ -x /etc/rc.d/rc.proftpd ] && /etc/rc.d/rc.proftpd stop
# Stop Exim.
[[ -x /etc/rc.d/rc.exim ]] && /etc/rc.d/rc.exim stop
# Stop greylistd.
[ -x /etc/rc.d/rc.greylistd ] && /etc/rc.d/rc.greylistd stop
# Stop SpamAssassin.
[ -x /etc/rc.d/rc.spamd ] && /etc/rc.d/rc.spamd stop
# Stop the php-fpm FastCGI daemon.
[ -x /etc/rc.d/rc.php-fpm ] && /etc/rc.d/rc.php-fpm stop
# Stop netdata.
[[ -x /etc/rc.d/rc.netdata ]] && /etc/rc.d/rc.netdata stop
# Stop fail2ban.
[ -x /etc/rc.d/rc.fail2ban ] && /etc/rc.d/rc.fail2ban stop
# Stop netdata.
[ -x /etc/rc.d/rc.netdata ] && /etc/rc.d/rc.netdata stop
# Stop the vnstat daemon.
[ -x /etc/rc.d/rc.vnstat ] && /etc/rc.d/rc.vnstat stop
# Stop the Open VM Tools daemon.
[[ -x /etc/rc.d/rc.vmtoolsd ]] && /etc/rc.d/rc.vmtoolsd stop
# Stop the MCE daemon.
[ -x /etc/rc.d/rc.mcelog ] && /etc/rc.d/rc.mcelog stop