From 28b5ccca8e41ae945b8e3e70eb1adb4ee922c8d2 Mon Sep 17 00:00:00 2001 From: kekskurse Date: Fri, 21 Jul 2023 16:02:35 +0200 Subject: [PATCH] stuff --- scripts/postinstall.sh | 6 ++++++ scripts/preinstall.sh | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index fc2b05d..2291f21 100644 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -1,2 +1,8 @@ +if [ -f "/etc/http-server-status/config.yml" ]; then + echo "Config exists" +else + cp /etc/http-server-status/config.yml.sample /etc/http-server-status/config.yml +fi + systemctl daemon-reload systemctl is-active --quiet http-server-status && systemctl restart http-server-status && echo "Restart Service" diff --git a/scripts/preinstall.sh b/scripts/preinstall.sh index 8faaedf..e760b25 100644 --- a/scripts/preinstall.sh +++ b/scripts/preinstall.sh @@ -2,8 +2,3 @@ if ! id -u http-server-status > /dev/null 2>&1; then adduser --system http-server-status fi -if [ -f "/etc/http-server-status/config.yml" ]; then - echo "Config exists" -else - cp /etc/http-server-status/config.yml.sample /etc/http-server-status/config.yml -fi \ No newline at end of file