From 9d2530ab02803d27be53dc55111f78fbaed0f192 Mon Sep 17 00:00:00 2001 From: "A.M. Rowsell" Date: Tue, 22 Apr 2025 04:26:49 -0400 Subject: [PATCH] fix: corrected errors in install.sh Also improved the script to actually use the script location in the discorss.service file... yeah I should have done that from the start, d'oh! --- install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 3c32200..d3ed185 100755 --- a/install.sh +++ b/install.sh @@ -11,6 +11,8 @@ printf "\e[1;34mDisco\e[1;38;5;208mRSS\e[0m Install Helper Script\n\n" +workingDir=$(pwd) + cat << EOF > discorss.service [Unit] Description=Discord RSS feeder @@ -19,7 +21,7 @@ Wants=discorss.timer [Service] Type=oneshot TimeoutStartSec=120 -ExecStart=/home/amr/workspace/python/discorss/discorss.py +ExecStart=$workingDir/discorss.py [Install] WantedBy=default.target @@ -45,7 +47,8 @@ mkdir -p ~/.config/systemd/user/ cp discorss.service ~/.config/systemd/user/ cp discorss.timer ~/.config/systemd/user/ - +rm -f discorss.service +rm -f discorss.timer systemctl --user daemon-reload printf "Would you like a basic example config created for you? [y/n]: " @@ -60,9 +63,9 @@ if [[ "$answer1" =~ ^([yY])$ ]]; then "siteurl": "https://www.phoronix.com/", "url": "http://www.phoronix.com/rss.php", "webhook": "PASTE WEBHOOK URL HERE", - "offset": 0, + "offset": 0 } - ], + ] } EOF printf "\nMake sure to edit \e[1;34m~/.config/discorss/discorss.conf\e[0m and add in your custom feeds and webhook URLS! The script will just error out if you don't do this."