mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-21 03:02:09 +00:00
Made script check to see if you are running as root
This commit is contained in:
parent
b65dc98966
commit
9d814940f9
@ -1,6 +1,14 @@
|
||||
# Add Blocklist.de malicious IP Addresses to Daily Crontab
|
||||
# Also IPtables-persistent to save IP addresses upon reboot
|
||||
# Added by Alon "ChiefGyk" Ganon
|
||||
# Are we running as root?
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root. Please re-run like this:"
|
||||
echo
|
||||
echo "sudo $0"
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
cp sync-fail2ban /etc/cron.daily/sync-fail2ban
|
||||
chmod a+x /etc/cron.daily/sync-fail2ban
|
||||
time /etc/cron.daily/sync-fail2ban
|
||||
|
Loading…
Reference in New Issue
Block a user