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