snippets/base_script.sh: add check if systemd is supported

This commit is contained in:
Christoph 2018-04-30 18:29:41 +02:00
parent 534badfbf6
commit ece5d5d1a1

View File

@ -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