mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Update yunohost_firewall.py
Better display for firewall_list()
This commit is contained in:
parent
9f1e6adf26
commit
1522a7f759
1 changed files with 10 additions and 2 deletions
|
@ -42,8 +42,16 @@ def firewall_list():
|
||||||
Parse and display firwall.yml
|
Parse and display firwall.yml
|
||||||
'''
|
'''
|
||||||
with open ('firewall.yml') as f:
|
with open ('firewall.yml') as f:
|
||||||
firewall = yaml.load(f)
|
firewall = yaml.load(f)
|
||||||
print(firewall)
|
listPortTCP=firewall['ipv4']['TCP']
|
||||||
|
listPortUDP=firewall['ipv4']['UDP']
|
||||||
|
print("Port TCP OPEN :")
|
||||||
|
for i,port in enumerate (listPortTCP):
|
||||||
|
print("-"+str(port))
|
||||||
|
print("Port UDP OPEN :")
|
||||||
|
for i,port in enumerate (listPortUDP):
|
||||||
|
print("-"+str(port))
|
||||||
|
f.close()
|
||||||
|
|
||||||
def firewall_reload():
|
def firewall_reload():
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Add table
Reference in a new issue