Fix systemctl show value
This commit is contained in:
parent
f41d42a6dc
commit
6a9fbdd0a3
|
@ -214,7 +214,7 @@ main() { # {{{
|
||||||
debug_message "-- Connect VPN BEGIN"
|
debug_message "-- Connect VPN BEGIN"
|
||||||
### If forticlient.service unit is not started {{{
|
### 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)
|
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."
|
debug_message "| Try to start forticlient.service unit."
|
||||||
sudo systemctl restart forticlient.service \
|
sudo systemctl restart forticlient.service \
|
||||||
|| error_message "Error while (re)starting forticlient.service unit" 22
|
|| error_message "Error while (re)starting forticlient.service unit" 22
|
||||||
|
|
Loading…
Reference in New Issue