From 11e2aa3f352aea6e787354ff2569e07617ba4b5b Mon Sep 17 00:00:00 2001 From: Aaron Murray Date: Mon, 20 Apr 2020 07:09:18 -0500 Subject: [PATCH] check for systemd --- install | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/install b/install index 6603438..26ffe32 100755 --- a/install +++ b/install @@ -13,12 +13,18 @@ # https://github.com/armbian/config/blob/master/debian-software # https://forum.openmediavault.org/index.php/Thread/25062-Install-OMV5-on-Debian-10-Buster/ # -# version: 1.0.3 +# version: 1.0.4 # if [[ $(id -u) -ne 0 ]]; then - echo "This script must be executed as root or using sudo." - exit 99 + echo "This script must be executed as root or using sudo." + exit 99 +fi + +systemd="$(ps --no-headers -o comm 1)" +if [ ! "${systemd}" = "systemd" ]; then + echo "This system is not running systemd. Exiting..." + exit 100 fi declare -l codename