[pve-devel] [PATCH manager 5/8] postinst: start/restart units like dh_start

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Mar 13 10:46:39 CET 2018


with an added "reload-or" for pvedaemon/pveproxy/spiceproxy, which
dh_start unfortunately does not yet support

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 debian/postinst | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/debian/postinst b/debian/postinst
index f2ac0ab2..a648ec39 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -64,8 +64,14 @@ case "$1" in
     done
 
     if test ! -e /proxmox_install_mode; then
+	# modeled after code generated by dh_start
 	for unit in ${UNITS}; do
-	    deb-systemd-invoke reload-or-restart "$unit"
+	    if test -n "$2"; then
+		dh_action="reload-or-try-restart";
+	    else
+		dh_action="start"
+	    fi
+	    deb-systemd-invoke $dh_action "$unit"
 	done
     fi
 
-- 
2.14.2





More information about the pve-devel mailing list