mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
commit
542b833ae1
2 changed files with 33 additions and 0 deletions
|
@ -499,6 +499,11 @@ firewall:
|
|||
### firewall_removeupnp()
|
||||
removeupnp:
|
||||
action_help: Remove upnp cron
|
||||
|
||||
|
||||
### firewall_stop()
|
||||
stop:
|
||||
action_help: Stop iptables and ip6tables
|
||||
#############################
|
||||
# Tools #
|
||||
#############################
|
||||
|
|
|
@ -233,9 +233,37 @@ def firewall_installupnp():
|
|||
|
||||
|
||||
def firewall_removeupnp():
|
||||
"""
|
||||
Remove upnp cron
|
||||
Keyword arguments:
|
||||
None
|
||||
Return
|
||||
None
|
||||
"""
|
||||
|
||||
try:
|
||||
os.remove("/etc/cron.d/yunohost-firewall")
|
||||
except:
|
||||
raise YunoHostError(167,_("UPNP cron was not installed!"))
|
||||
|
||||
win_msg(_("UPNP cron removed"))
|
||||
|
||||
|
||||
def firewall_stop():
|
||||
"""
|
||||
Stop firewall
|
||||
Keyword arguments:
|
||||
None
|
||||
Return
|
||||
None
|
||||
"""
|
||||
|
||||
os.system ("iptables -P INPUT ACCEPT")
|
||||
os.system ("iptables -F")
|
||||
os.system ("iptables -X")
|
||||
|
||||
os.system ("ip6tables -P INPUT ACCEPT")
|
||||
os.system ("ip6tables -F")
|
||||
os.system ("ip6tables -X")
|
||||
|
||||
firewall_removeupnp()
|
||||
|
|
Loading…
Reference in a new issue