summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordennis <dennis@mrslave>2021-03-29 12:13:40 +0200
committerdennis <dennis@mrslave>2021-03-29 12:13:40 +0200
commit96f3471cd130bc7a578068f5fc8470d436b5d05b (patch)
tree09df6ee64c37581379709bc028903ee92ed86b7b
parentmaking the journal more persistent. Will now use machine-id if it exists (diff)
downloadmkosi-sonarr-96f3471cd130bc7a578068f5fc8470d436b5d05b.tar.gz
Sonarr 3.0, and new mountpointsHEADmaster
l---------mkosi.extra/etc/systemd/system/multi-user.target.wants/sonarr.service1
-rw-r--r--mkosi.extra/etc/systemd/system/sonarr.service17
-rw-r--r--mkosi.nspawn8
-rwxr-xr-xmkosi.postinst11
4 files changed, 9 insertions, 28 deletions
diff --git a/mkosi.extra/etc/systemd/system/multi-user.target.wants/sonarr.service b/mkosi.extra/etc/systemd/system/multi-user.target.wants/sonarr.service
deleted file mode 120000
index c518c7e..0000000
--- a/mkosi.extra/etc/systemd/system/multi-user.target.wants/sonarr.service
+++ /dev/null
@@ -1 +0,0 @@
-../sonarr.service \ No newline at end of file
diff --git a/mkosi.extra/etc/systemd/system/sonarr.service b/mkosi.extra/etc/systemd/system/sonarr.service
deleted file mode 100644
index 86b461b..0000000
--- a/mkosi.extra/etc/systemd/system/sonarr.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=Sonarr Daemon
-After=network.target
-
-[Service]
-User=warez
-Group=warez
-Umask=022
-
-Type=simple
-ExecStart=/usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser -data=/config
-TimeoutStopSec=20
-KillMode=process
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
diff --git a/mkosi.nspawn b/mkosi.nspawn
index da77bf1..088dab2 100644
--- a/mkosi.nspawn
+++ b/mkosi.nspawn
@@ -9,10 +9,10 @@ LinkJournal=try-host
[Files]
#PrivateUsersChown=yes
BindReadOnly=
-Bind=/var/local/sonarr:/config
-Bind=/srv/media/series:/tv
-Bind=/srv/media/series:/srv/cold/series
-Bind=/srv/data/complete:/downloads
+Bind=/var/local/sonarr:/var/lib/sonarr
+Bind=/srv/media/series
+Bind=/srv/nzbs
+Bind=/srv/torrents
[Network]
VirtualEthernet=no
diff --git a/mkosi.postinst b/mkosi.postinst
index 4c77109..dda2f81 100755
--- a/mkosi.postinst
+++ b/mkosi.postinst
@@ -20,13 +20,12 @@ echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" > /et
# sonarr
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493
-echo "deb http://apt.sonarr.tv/ master main" > /etc/apt/sources.list.d/sonarr.list
+echo "deb http://apt.sonarr.tv/ubuntu focal main" > /etc/apt/sources.list.d/sonarr.list
apt-get update
-apt-get install --yes nzbdrone
+groupadd --system --gid 997 sonarr
+useradd --system --gid sonarr --uid 997 --home-dir /var/lib/sonarr --create-home sonarr
-groupadd --system --gid 997 warez
-useradd --system --gid warez --uid 997 --home-dir /opt/NzbDrone warez
-
-chown -R warez: /opt/NzbDrone
+apt-get install --yes sonarr
+systemctl enable sonarr