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:
parent
b0f08c405b
commit
9d2530ab02
1 changed files with 7 additions and 4 deletions
11
install.sh
11
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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue