From e2f62a85269aa3134775c11fbf0366af4cf48d63 Mon Sep 17 00:00:00 2001 From: Cody Lee Date: Sun, 4 Dec 2022 08:57:25 -0600 Subject: [PATCH] parsing fix --- scripts/post-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/post-install.sh b/scripts/post-install.sh index c61436c1..289b9280 100755 --- a/scripts/post-install.sh +++ b/scripts/post-install.sh @@ -6,7 +6,7 @@ systemd_version=0 if ! command -V systemctl >/dev/null 2>&1; then use_systemctl="False" else - systemd_version=$(systemctl --version | head -1 | sed 's/systemd //g') + systemd_version=$(systemctl --version | head -1 | sed 's/systemd //g' | sed 's/ .*//') fi cleanup() { @@ -49,7 +49,7 @@ cleanInstall() { else # rhel/centos7 cannot use ExecStartPre=+ to specify the pre start should be run as root # even if you want your service to run as non root. - if [ "${systemd_version}" -lt 231 ]; then + if [] "${systemd_version}" -lt 231 ]; then printf "\033[31m systemd version %s is less then 231, fixing the service file \033[0m\n" "${systemd_version}" sed -i "s/=+/=/g" /etc/systemd/service/unpoller.service fi