mirror of
https://github.com/Jackett/Jackett
synced 2024-12-21 23:33:18 +00:00
2
Installation on Alpine Linux
nicedevil007 edited this page 2023-11-19 15:44:52 +01:00
Here you can find instruction to install Jackett on Alpine Linux.
# requirements on alpine/musl:
apk add --no-cache sqlite-libs gcompat bash icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib curl
# Download and Extract Musl build to /opt:
cd /opt
RELEASE=$(curl -s https://api.github.com/repos/Jackett/Jackett/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget https://github.com/Jackett/Jackett/releases/download/v${RELEASE}/Jackett.Binaries.LinuxMuslAMDx64.tar.gz
tar -C . -xvf "Jackett.Binaries.LinuxMuslAMDx64.tar.gz"
rm "Jackett.Binaries.LinuxMuslAMDx64.tar.gz"
# setup user and group
addgroup -S jackett
adduser -S -D -h /opt/JackettData -s /sbin/nologin jackett -G jackett
addgroup -S media && addgroup -S jackett media
# setup permissions
chown -R jackett:jackett /opt/Jackett
chown -R jackett:jackett /opt/JackettData
# create openrc service
tee /etc/init.d/jackett <<EOF
#!/sbin/openrc-run
command="/opt/Jackett/jackett"
command_args="--NoRestart"
command_user="jackett:jackett"
command_background=true
name="\${RC_SVCNAME}"
basedir="/opt/Jackett"
datadir="/opt/JackettData"
start_stop_daemon_args="--chdir \${basedir}"
pidfile="/run/\${RC_SVCNAME}.pid"
depend() {
after network-online
use network-online
}
stop_pre() {
# from jackett_launcher.sh
while pgrep -u "\$(whoami)" JackettUpdater > /dev/null; do
sleep 1
done
}
start_pre() {
checkpath -q -d -m 0777 -o "\${command_user}" \\
\${basedir} \\
\${datadir}
export XDG_CONFIG_HOME=\${datadir}
rm -f "\${datadir}/\${RC_SVCNAME}.pid"
}
EOF
chmod +x /etc/init.d/jackett
# add service to autostart
rc-update add jackett default
rc-service jackett start
# debugging
rc-service jackett status
cat /var/log/messages
cat /opt/JackettData/Jackett/log.txt