Initial productized Importarr service

This commit is contained in:
2026-07-29 11:37:57 +02:00
commit 577ea97d46
25 changed files with 886 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env sh
set -eu
if [ "$(id -u)" -ne 0 ]; then
echo "Run as root: sudo sh deploy/systemd-install.sh" >&2
exit 1
fi
install -d -m 0755 /etc/importarr /var/lib/importarr
if ! id importarr >/dev/null 2>&1; then
useradd --system --home /var/lib/importarr --shell /usr/sbin/nologin importarr
fi
chown importarr:importarr /var/lib/importarr
if [ ! -f /etc/importarr/importarr.env ]; then
install -m 0600 deploy/importarr.env.example /etc/importarr/importarr.env
echo "Created /etc/importarr/importarr.env; edit it before starting the service."
fi
install -m 0644 deploy/importarr.service /etc/systemd/system/importarr.service
python3 -m pip install --upgrade .
systemctl daemon-reload
systemctl enable importarr.service
echo "Edit /etc/importarr/importarr.env, then run: systemctl start importarr.service"