Test if status is different from "active"
This commit is contained in:
parent
b0dc0934a4
commit
ea4019a369
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue