From 2d7951a666314312be8ae63691b1e2d47cf9dc37 Mon Sep 17 00:00:00 2001 From: azlux Date: Mon, 30 Apr 2018 23:22:47 +0200 Subject: [PATCH] Suggestion from #50 Check if systemd log2ram service is running before the install; --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index d04ed2a..e250d9c 100644 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh -[ -d /var/hdd.log ] && echo "ERROR: log2ram still installed. Uninstall first!" -[ -d /var/hdd.log ] && exit 1 +systemctl -q is-active log2ram && { echo "ERROR: log2ram service is still running. Please run \"sudo service log2ram stop\" to stop it."; exit 1; } + if [ "$(id -u)" -eq 0 ] then