From 6a9fbdd0a36ce666857f603dda7193a714fb2cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Fri, 27 Jan 2023 19:13:02 +0100 Subject: [PATCH] Fix systemctl show value --- ur/fortinet.vpn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ur/fortinet.vpn.sh b/ur/fortinet.vpn.sh index f31d1b5..a4743af 100755 --- a/ur/fortinet.vpn.sh +++ b/ur/fortinet.vpn.sh @@ -214,7 +214,7 @@ main() { # {{{ debug_message "-- Connect VPN BEGIN" ### If forticlient.service unit is not started {{{ systemd_forticlient_status=$(systemctl show --property ActiveState --value forticlient.service || error_message "Error while requesting forticlient.service unit status." 21) - if [ "${systemd_forticlient_status}" = "failed" ]; then + if [ "${systemd_forticlient_status}" = "inactive" ]; then debug_message "| Try to start forticlient.service unit." sudo systemctl restart forticlient.service \ || error_message "Error while (re)starting forticlient.service unit" 22