diff --git a/snippets/base_script.sh b/snippets/base_script.sh index 17bc0cc..654147b 100755 --- a/snippets/base_script.sh +++ b/snippets/base_script.sh @@ -196,6 +196,16 @@ else terminal=false fi +# -Is systemd supported on this system? +# - +systemd_supported=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] && [[ -n "$systemctl" ]] ; then + systemd_supported=true +fi + # - Print help? # - if [[ "$(trim $*)" = "-h" ]] || [[ "$(trim $*)" = "--help" ]] ; then