[enh] Enable uPnP at postinstall

This commit is contained in:
Kload 2014-05-17 21:48:02 +02:00
parent 9f23945ed7
commit 59e8b0e035

View file

@ -186,6 +186,7 @@ def tools_postinstall(domain, password, dyndns=False):
from yunohost.backup import backup_init from yunohost.backup import backup_init
from yunohost.app import app_ssowatconf from yunohost.app import app_ssowatconf
from yunohost.firewall import firewall_upnp
try: try:
with open('/etc/yunohost/installed') as f: pass with open('/etc/yunohost/installed') as f: pass
@ -279,6 +280,9 @@ def tools_postinstall(domain, password, dyndns=False):
# Change LDAP admin password # Change LDAP admin password
tools_adminpw(old_password='yunohost', new_password=password) tools_adminpw(old_password='yunohost', new_password=password)
# Enable uPnP
firewall_upnp(action='enable')
os.system('touch /etc/yunohost/installed') os.system('touch /etc/yunohost/installed')
msignals.display(m18n.n('yunohost_configured'), 'success') msignals.display(m18n.n('yunohost_configured'), 'success')