Use sudo option for communicator test command instead of inline sudo to properly use configured sudo value. Use command for checking availability of hostnamectl. Use is-active for determining if a service is being actively managed by systemd.
Use sudo option for communicator test command instead of inline sudo to properly use configured sudo value. Use command for checking availability of hostnamectl. Use is-active for determining if a service is being actively managed by systemd.