From 1787d4da993beb0cfe5872360833637d1d224652 Mon Sep 17 00:00:00 2001 From: "A.M. Rowsell" Date: Fri, 25 Apr 2025 23:59:24 -0400 Subject: [PATCH] fix: bail install if on a non-systemd machine Instead suggest using cron. At some point I can probably write up some simple instructions for a basic cron setup. --- install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.sh b/install.sh index 7a89398..82a5fab 100755 --- a/install.sh +++ b/install.sh @@ -13,6 +13,14 @@ printf "\e[1;34mDisco\e[1;38;5;208mRSS\e[0m Install Helper Script\n\n" workingDir=$(pwd) +# bail if we're on a non-systemd system, suggest cron +if [[ -d /run/systemd/system ]]; then + printf "systemd detected..." +else + printf "This script and DiscoRSS in general are optimized for systemd! You can use cron as a substitute but I haven't written any documentation for it, so you're on your own for now!" + exit 127 # command not found exit code +fi + printf "Would you like the systemd service and timer files created for you? [y/n]: " read answer if [[ "$answer" =~ ^([yY])$ ]]; then