Created
July 22, 2020 14:04
-
-
Save eriktelepovsky/bfcb22a4c827676583a3275764adebb2 to your computer and use it in GitHub Desktop.
DenyHosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env sh | |
set -eu | |
set -o pipefail | |
PID_FILE='/var/run/denyhosts.pid' | |
touch /var/log/denyhosts | |
tail -f -n 0 /var/log/denyhosts & | |
# Make sure the pid file isn't left over from a previous crashed instance | |
if [ -f "$PID_FILE" ]; then | |
echo 'Removing old PID file.' | |
rm -r "$PID_FILE" | |
fi | |
exec python /usr/bin/denyhosts.py --config /etc/denyhosts.conf --purge --sync --foreground |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment