diff --git a/debian/postinst b/debian/postinst index ceaca3e4b..5a2c03ec1 100644 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,6 @@ set -e do_configure() { rm -rf /var/cache/moulinette/* - service yunohost-api restart if [ ! -f /etc/yunohost/installed ]; then bash /usr/share/yunohost/hooks/conf_regen/01-yunohost diff --git a/debian/rules b/debian/rules index 18991261a..601c47ea3 100755 --- a/debian/rules +++ b/debian/rules @@ -5,11 +5,8 @@ #export DH_VERBOSE=1 %: - dh ${@} --with=python2 + dh ${@} --with=python2,systemd 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/debian/yunohost-firewall.service b/debian/yunohost-firewall.service index 1dd46f477..f61ca1f64 100644 --- a/debian/yunohost-firewall.service +++ b/debian/yunohost-firewall.service @@ -9,6 +9,3 @@ ExecStart=/usr/bin/yunohost firewall reload ExecReload=/usr/bin/yunohost firewall reload ExecStop=/usr/bin/yunohost firewall stop RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index 50102765e..833ef71aa 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -270,12 +270,12 @@ def tools_postinstall(domain, password, ignore_dyndns=False): # Enable UPnP silently and reload firewall firewall_upnp('enable', no_refresh=True) + os.system('touch /etc/yunohost/installed') + # 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') - service_regenconf(force=True) msignals.display(m18n.n('yunohost_configured'), 'success')