diff --git a/ur/fortinet.vpn.v6.sh b/ur/fortinet.vpn.v6.sh index adb03e5..7dcb02d 100755 --- a/ur/fortinet.vpn.v6.sh +++ b/ur/fortinet.vpn.v6.sh @@ -251,7 +251,7 @@ main() { # {{{ debug_message "-- Connect VPN BEGIN" ### If forticlient-scheduler.service unit is not started {{{ systemd_forticlient_status=$(systemctl show --property ActiveState --value forticlient-scheduler.service || error_message "Error while requesting forticlient-scheduler.service unit status." 21) - if [ "${systemd_forticlient_status}" = "inactive" ] || [ "${systemd_forticlient_status}" = "failed" ]; then + if [ "${systemd_forticlient_status}" != "active" ]; then debug_message "| Try to start forticlient-scheduler.service unit." sudo systemctl restart forticlient-scheduler.service \ || error_message "Error while (re)starting forticlient-scheduler.service unit" 22 diff --git a/ur/fortinet.vpn.v7.sh b/ur/fortinet.vpn.v7.sh index 4d449de..df3840e 100755 --- a/ur/fortinet.vpn.v7.sh +++ b/ur/fortinet.vpn.v7.sh @@ -250,7 +250,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}" = "inactive" ]; then + if [ "${systemd_forticlient_status}" != "active" ]; then debug_message "| Try to start forticlient.service unit." sudo systemctl restart forticlient.service \ || error_message "Error while (re)starting forticlient.service unit" 22