From f59aed701a3462fe2c0a92c9515898fb83f70d3b Mon Sep 17 00:00:00 2001 From: Kevin Shipley Date: Mon, 29 Jan 2018 13:34:40 -0500 Subject: [PATCH] fail2ban install - fix wait for confirmation apt is waiting for user input before installing fail2ban and the install script stalls. --- install/fail2ban.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/fail2ban.py b/install/fail2ban.py index d7473b4..c305669 100644 --- a/install/fail2ban.py +++ b/install/fail2ban.py @@ -1,7 +1,7 @@ import os, shutil def install(): - os.popen('sudo apt-get install fail2ban 2>&1').read() + os.popen('sudo apt-get install --yes fail2ban 2>&1').read() cpuArch = os.uname()[4] if cpuArch.startswith('x86'): shutil.move('/etc/fail2ban/jail.d/defaults-debian.conf', '/etc/fail2ban/jail.d/defaults-debian.orig') @@ -19,4 +19,4 @@ def install(): fileOut.write('[apache]\n') fileOut.write('enabled = true\n') fileOut.write('port = 80,443,5602,9201\n') - os.popen('sudo service fail2ban restart').read() \ No newline at end of file + os.popen('sudo service fail2ban restart').read()