The current OpenVPN restart-after-sleep script will return a non-zero exit code if the system resumes from sleep and there are no active OpenVPN units, resulting in systemd reporting the system as degraded. Avoid that by only attempting to restart OpenVPN programs that are actually running at the time. This also means that any user-managed OpenVPN sessions won't be affected by NixOS's OpenVPN handling.
6.8 KiB
6.8 KiB