From 8e62ec37725d4d3d91091d9ee451c0e36dcc8901 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 7 Nov 2017 12:15:40 -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"