66 lines
2.2 KiB
Bash
Executable file
66 lines
2.2 KiB
Bash
Executable file
#!/bin/bash
|
|
# /etc/rc.d/rc.local - Local system startup script.
|
|
# This script will be run when the system is first booted.
|
|
|
|
# Start the MCE daemon.
|
|
[ -x /etc/rc.d/rc.mcelog ] && /etc/rc.d/rc.mcelog start
|
|
|
|
# Start the qemu guest additions agent.
|
|
[ -x /etc/rc.d/rc.qemu-ga ] && /etc/rc.d/rc.qemu-ga start
|
|
|
|
# Start GlusterFS daemon.
|
|
[ -x /etc/rc.d/rc.glusterd ] && /etc/rc.d/rc.glusterd start
|
|
|
|
# Start the vnstat daemon.
|
|
[ -x /etc/rc.d/rc.vnstat ] && /etc/rc.d/rc.vnstat start
|
|
|
|
# Start netdata.
|
|
[ -x /etc/rc.d/rc.netdata ] && /etc/rc.d/rc.netdata start
|
|
|
|
# Start fail2ban.
|
|
[ -x /etc/rc.d/rc.fail2ban ] && /etc/rc.d/rc.fail2ban start
|
|
|
|
# Start the php-fpm FastCGI daemon.
|
|
[ -x /etc/rc.d/rc.php-fpm ] && /etc/rc.d/rc.php-fpm start
|
|
|
|
# Start SpamAssassin.
|
|
[ -x /etc/rc.d/rc.spamd ] && /etc/rc.d/rc.spamd start
|
|
|
|
# Start greylistd.
|
|
[ -x /etc/rc.d/rc.greylistd ] && /etc/rc.d/rc.greylistd start
|
|
|
|
# Start proftpd.
|
|
[ -x /etc/rc.d/rc.proftpd ] && {
|
|
/opt/bin/lumberjack -u logger -z -r -i /run/slackware.uk-ftpd.log -o logger:ftp -mp 006 -l logs/ftpd-transfers.log \
|
|
/data/sites/slackware.uk logs/%Y/%m/ftpd-transfers.log &
|
|
/etc/rc.d/rc.proftpd start
|
|
}
|
|
|
|
# Start the rsync daemon.
|
|
[ -x /etc/rc.d/rc.rsyncd ] && {
|
|
/opt/bin/lumberjack -u logger -z -r -i /run/rsyncd.log -o logger:mirror -mp 006 -l logs/rsyncd-transfers.log \
|
|
/data/sites/slackware.uk logs/%Y/%m/rsyncd-transfers.log &
|
|
/etc/rc.d/rc.rsyncd start
|
|
}
|
|
|
|
# Start the bandwidth bar generator.
|
|
[ -x /opt/bin/bwbar ] && sudo -b /opt/bin/bwbar -f /run/bwbar.txt -p /run/bwbar.png -t 1 -x 800 -y 8 -b 2 eth0 1000
|
|
|
|
# Start seeding the torrents.
|
|
grep "^seeder:" /etc/passwd >/dev/null 2>&1 && su - seeder -c /home/seeder/start-seeding
|
|
|
|
# Start libvirt.
|
|
[ -x /etc/rc.d/rc.libvirt ] && /etc/rc.d/rc.libvirt start
|
|
|
|
# Start the lxcfs fuse module.
|
|
[ -x /etc/rc.d/rc.lxcfs ] && /etc/rc.d/rc.lxcfs start
|
|
|
|
# Start containers.
|
|
[ -x /etc/rc.d/rc.lxc ] && {
|
|
# Proxy ARP is required for the LXC bridge to function correctly.
|
|
echo 1 >/proc/sys/net/ipv4/conf/br0/proxy_arp
|
|
/etc/rc.d/rc.lxc start
|
|
}
|
|
|
|
# Notify that the server has booted.
|
|
CONFIG_FILE="server" /opt/bin/pushover -T "Successful boot up: ${HOSTNAME%%.*}" -p 1 -m "$(printf '%(%d %b %Y - %H:%M:%S)T')"
|