From e921aea3194280ea1d24a21b28357600554c3aad Mon Sep 17 00:00:00 2001 From: Ejner Fergo <efer@dtu.dk> Date: Thu, 15 Oct 2020 12:56:03 +0200 Subject: [PATCH] fix systemctl version grep --- comp-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comp-backup.sh b/comp-backup.sh index 3845667..275953b 100755 --- a/comp-backup.sh +++ b/comp-backup.sh @@ -86,7 +86,7 @@ elif [ $HOST_OS = 'Linux' ]; then echo "No systemd - Backup will need to be run manually" else SYSTEMD=1 - sysd_ver=$(systemctl --version |grep -o '[0-9][0-9][0-9]') + sysd_ver=$(systemctl --version |grep -o '\s[0-9][0-9][0-9]\s') if [ $sysd_ver -lt 220 ]; then echo "No 'systemctl --user' capability" echo "Installing system wide" -- GitLab