2019-11-05 17:45:28 +00:00
|
|
|
#!/bin/sh
|
2019-10-30 01:58:11 +00:00
|
|
|
|
|
|
|
# Helper script to fix
|
|
|
|
# https://github.com/Jackett/Jackett/issues/5208#issuecomment-547565515
|
|
|
|
|
2019-11-05 17:45:28 +00:00
|
|
|
# Get full Jackett root path
|
|
|
|
JACKETT_DIR="$(dirname "$(readlink -f "$0")")"
|
2019-10-30 01:58:11 +00:00
|
|
|
|
2020-05-25 21:12:07 +00:00
|
|
|
# Launch Jackett (with CLI parameters)
|
|
|
|
"${JACKETT_DIR}/jackett" --NoRestart "$@"
|
2019-10-30 01:58:11 +00:00
|
|
|
|
|
|
|
# Get user running the service
|
|
|
|
JACKETT_USER=$(whoami)
|
|
|
|
|
|
|
|
# Wait until the updater ends
|
2020-03-10 20:49:26 +00:00
|
|
|
while pgrep -u "${JACKETT_USER}" JackettUpdater > /dev/null; do
|
2020-05-25 21:12:07 +00:00
|
|
|
sleep 1
|
2019-10-30 01:58:11 +00:00
|
|
|
done
|