1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-21 03:02:09 +00:00

Fix fail2ban tests for owncloud 9

This commit is contained in:
yodax 2016-07-31 16:33:57 +02:00
parent 294f13c630
commit c5f7af811a

View File

@ -10,11 +10,12 @@ import sys, os, time, functools
# parse command line # parse command line
if len(sys.argv) < 2: if len(sys.argv) < 3:
print("Usage: tests/fail2ban.py user@hostname") print("Usage: tests/fail2ban.py user@hostname owncloud_user")
sys.exit(1) sys.exit(1)
ssh_user, hostname = sys.argv[1].split("@", 1) ssh_user, hostname = sys.argv[1].split("@", 1)
owncloud_user = sys.argv[2]
# define some test types # define some test types
@ -189,7 +190,7 @@ if __name__ == "__main__":
run_test(http_test, ["/admin/munin/", 401], 20, 30, 1) run_test(http_test, ["/admin/munin/", 401], 20, 30, 1)
# ownCloud # ownCloud
run_test(http_test, ["/cloud/remote.php/webdav", 401, None, None, ["aa", "aa"]], 20, 120, 1) run_test(http_test, ["/cloud/remote.php/webdav", 401, None, None, [owncloud_user, "aa"]], 20, 120, 1)
# restart fail2ban so that this client machine is no longer blocked # restart fail2ban so that this client machine is no longer blocked
restart_fail2ban_service(final=True) restart_fail2ban_service(final=True)