synology:jackett-synology
This is an old revision of the document!
Jackett on Synology
Latest version available from https://github.com/Jackett/Jackett/releases
After updates, Jackett may stop working properly. The start-stop-status script needs to be adjusted.
The following script appears to be working for Jackett Version 0.8.566.0 on DSM 6.1:
sudo vi /var/packages/jackett/scripts/start-stop-status
#!/bin/sh
# Package
PACKAGE="jackett"
DNAME="Jackett"
# Others
INSTALL_DIR="/usr/local/${PACKAGE}"
MONO_DIR="/usr/local/mono"
PATH="${INSTALL_DIR}/bin:${MONO_DIR}/bin:${PATH}"
USER="jackett"
MONO="${MONO_DIR}/bin/mono"
APPSERVER="${INSTALL_DIR}/share/jackett/JackettConsole.exe"
# CFG_FILE="${INSTALL_DIR}/var/.config/Jackett/ServerConfig.json"
PID_FILE="${INSTALL_DIR}/var/jackett.pid"
LOG_FILE="${INSTALL_DIR}/var/.config/Jackett/log.txt"
start_daemon ()
{
su - ${USER} -c "PATH=${PATH} nohup ${MONO} ${APPSERVER} --PIDFile ${PID_FILE} --NoRestart &>> ${LOG_FILE} &"
}
stop_daemon ()
{
kill `cat ${PID_FILE}`
wait_for_status 1 20 || kill -9 `cat ${PID_FILE}`
rm -f ${PID_FILE}
}
daemon_status ()
{
if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then
return
fi
rm -f ${PID_FILE}
return 1
}
wait_for_status ()
{
counter=$2
while [ ${counter} -gt 0 ]; do
daemon_status
[ $? -eq $1 ] && return
let counter=counter-1
sleep 1
done
return 1
}
case $1 in
start)
if daemon_status; then
echo ${DNAME} is already running
else
echo Starting ${DNAME} ...
start_daemon
fi
;;
stop)
if daemon_status; then
echo Stopping ${DNAME} ...
stop_daemon
else
echo ${DNAME} is not running
fi
;;
status)
if daemon_status; then
echo ${DNAME} is running
exit 0
else
echo ${DNAME} is not running
exit 1
fi
;;
log)
echo ${LOG_FILE}
;;
*)
exit 1
;;
esac
Manual update
In case of issues, the following instructions can be used to manually update jackett from synocommunity to the latest release:
sudo su - cd "/var/packages/jackett/target/share" synoservicectl --stop pkgctl-jackett mv jackett jackett-old #latest release on https://github.com/Jackett/Jackett/releases wget https://github.com/Jackett/Jackett/releases/download/v0.16.1269/Jackett.Binaries.Mono.tar.gz -O Jackett.Binaries.Mono.tar.gz tar -xzvf Jackett.Binaries.Mono.tar.gz mv Jackett jackett #check permissions using ls -ld jackett-old or stat jackett-old chown -R sc-jackett:jackett jackett synoservicectl --start pkgctl-jackett #test then clean up rm Jackett.Binaries.Mono.tar.gz rm -r jackett-old/
synology/jackett-synology.1601295843.txt.gz · Last modified: (external edit)