Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Capricelli
botfreak
Commits
9f63bb1f14fe
Commit
eef4d5fd
authored
Feb 06, 2022
by
Thomas Capricelli
Browse files
until we have a way to propagate the information "this ip/host has been
removed from black list", let's flush/fill again all lists.
parent
39baa435adf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
fabfile.py
View file @
9f63bb1f
...
...
@@ -72,6 +72,16 @@ def restart_daemons(c):
c
.
run
(
"supervisorctl restart botfreak-watcher"
,
pty
=
False
)
print
(
"Finished at"
+
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d %H:%M"
))
@
task
(
hosts
=
daemons_hosts
)
def
clear_daemons
(
c
):
"Empty ipset lists"
c
.
run
(
"echo ' '"
)
c
.
run
(
"uname -a"
)
c
.
run
(
"ipset flush botfreak-ipv4"
,
pty
=
False
)
c
.
run
(
"ipset flush botfreak-ipv6"
,
pty
=
False
)
print
(
"Finished at"
+
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d %H:%M"
))
@
task
(
hosts
=
web_hosts
)
def
deploy_web
(
c
):
"Update and restart the web server"
...
...
@@ -86,6 +96,13 @@ def deploy_daemons(c):
restart_daemons
(
c
)
print
(
"Finished at"
+
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d %H:%M"
))
@
task
(
hosts
=
daemons_hosts
)
def
reinit_daemons
(
c
):
"Clear all ipsets lists and restart the daemon to fill them cleanly"
clear_daemons
(
c
)
restart_daemons
(
c
)
print
(
"Finished at"
+
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d %H:%M"
))
@
task
()
def
deploy
(
c
):
"Deploy new code"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment