From 186a68a0ad290dd504ab5a14913ad63d4e9263d7 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 7 Nov 2017 12:16:19 -0700 Subject: [PATCH] don't exit with bad status code --- installer/install-for-systemd.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/installer/install-for-systemd.sh b/installer/install-for-systemd.sh index e2c5028..17a0bee 100644 --- a/installer/install-for-systemd.sh +++ b/installer/install-for-systemd.sh @@ -13,11 +13,16 @@ rm "$my_app_dist/$my_app_systemd_service.2" safe_copy_config "$my_app_dist/$my_app_systemd_service" "$my_root/$my_app_systemd_service" safe_copy_config "$my_app_dist/$my_app_systemd_tmpfiles" "$my_root/$my_app_systemd_tmpfiles" -$sudo_cmd systemctl stop "${my_app_name}.service" >/dev/null 2>/dev/null +$sudo_cmd systemctl stop "${my_app_name}.service" >/dev/null 2>/dev/null || true $sudo_cmd systemctl daemon-reload $sudo_cmd systemctl start "${my_app_name}.service" $sudo_cmd systemctl enable "${my_app_name}.service" +echo "" +echo "Fun systemd commands to remember:" +echo " $sudo_cmd systemctl daemon-reload" +echo " $sudo_cmd systemctl restart $my_app_name.service" +echo "" echo "$my_app_name started with systemctl, check its status like so:" echo " $sudo_cmd systemctl status $my_app_name" echo " $sudo_cmd journalctl -xe -u $my_app_name"