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!
This commit is contained in:
A.M. Rowsell 2025-04-22 04:26:49 -04:00
commit 9d2530ab02
Signed by: amr
GPG key ID: 0B6E2D8375CF79A9

View file

@ -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."