mirror of
https://github.com/Jackett/Jackett
synced 2025-01-03 13:46:10 +00:00
updater: fix systemd auto-update (#6249)
This should fix the systemd update issue. #5208 The users with this problem will have to reinstall the systemd service.
This commit is contained in:
parent
2a0f288fb2
commit
78eb6a60e4
1 changed files with 18 additions and 1 deletions
|
@ -32,6 +32,23 @@ if [[ $(systemctl status ${jackettservice} | grep "active (running)") ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Write the Jackett's launcher
|
||||
cat >"/bin/jackett_launcher.sh" <<EOL
|
||||
#!/bin/bash
|
||||
|
||||
${jackettdir}/jackett
|
||||
|
||||
while pgrep JackettUpdater > /dev/null ; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Jackett update complete"
|
||||
|
||||
EOL
|
||||
|
||||
# Give execution permissions
|
||||
chmod +x "/bin/jackett_launcher.sh"
|
||||
|
||||
# Write the systemd service descriptor
|
||||
cat >"/etc/systemd/system/${jackettservice}" <<EOL
|
||||
[Unit]
|
||||
|
@ -46,7 +63,7 @@ Type=simple
|
|||
User=${jackettuser}
|
||||
Group=${jackettuser}
|
||||
WorkingDirectory=${jackettdir}
|
||||
ExecStart=${jackettdir}/jackett --NoRestart
|
||||
ExecStart=/bin/jackett_launcher.sh
|
||||
TimeoutStopSec=20
|
||||
|
||||
[Install]
|
||||
|
|
Loading…
Reference in a new issue