From 637935f0581c04352358888a178f3b4712ec7d80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 13 Mar 2018 10:46:39 +0100 Subject: [PATCH] postinst: start/restart units like dh_start MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit with an added "reload-or" for pvedaemon/pveproxy/spiceproxy, which dh_start unfortunately does not yet support Signed-off-by: Fabian Grünbichler --- 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.39.5