diff --git a/debian/rules b/debian/rules index c61bb8858..18991261a 100755 --- a/debian/rules +++ b/debian/rules @@ -5,8 +5,11 @@ #export DH_VERBOSE=1 %: - dh ${@} --with=systemd,python2 + dh ${@} --with=python2 override_dh_installinit: + dh_systemd_enable --name yunohost-api + dh_systemd_enable --name yunohost-firewall --no-enable dh_installinit --name=yunohost-api dh_installinit --name=yunohost-firewall + dh_systemd_start diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index 867fc7759..50102765e 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -269,10 +269,10 @@ def tools_postinstall(domain, password, ignore_dyndns=False): # Enable UPnP silently and reload firewall firewall_upnp('enable', no_refresh=True) - firewall_reload() - # Enable iptables at boot time - os.system('update-rc.d yunohost-firewall defaults') + # Enable and start YunoHost firewall at boot time + os.system('update-rc.d yunohost-firewall enable') + os.system('service yunohost-firewall start') os.system('touch /etc/yunohost/installed')