summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.AURINFO43
-rw-r--r--.SRCINFO75
-rw-r--r--PKGBUILD123
-rw-r--r--addnzb.sh4
-rw-r--r--nzb.pngbin6298 -> 0 bytes
-rw-r--r--sab2_64.pngbin2745 -> 0 bytes
-rw-r--r--sabnzbd3
-rw-r--r--sabnzbd.confd8
-rwxr-xr-xsabnzbd.desktop11
-rw-r--r--sabnzbd.install71
-rw-r--r--sabnzbd.pngbin5724 -> 0 bytes
-rw-r--r--sabnzbd.service15
-rw-r--r--sabnzbd.sysusers2
-rw-r--r--sabnzbd.tmpfiles6
-rw-r--r--sabnzbd@.service28
-rw-r--r--x-nzb.xml10
16 files changed, 192 insertions, 207 deletions
diff --git a/.AURINFO b/.AURINFO
deleted file mode 100644
index 6ccbf583a48d..000000000000
--- a/.AURINFO
+++ /dev/null
@@ -1,43 +0,0 @@
-pkgbase = sabnzbd
- pkgdesc = A web-interface based binary newsgrabber with NZB file support
- pkgver = 0.7.20
- pkgrel = 1
- url = http://www.sabnzbd.org
- install = sabnzbd.install
- arch = any
- license = GPL
- depends = curl
- depends = par2cmdline
- depends = python2
- depends = python2-cheetah
- depends = python2-yenc
- depends = sqlite
- depends = unrar
- depends = unzip
- optdepends = xdg-utils: registration of .nzb files
- optdepends = python2-feedparser: rss support
- optdepends = python2-pyopenssl: ssl support
- optdepends = par2cmdline-tbb: par2 multi-threading
- backup = etc/conf.d/sabnzbd
- backup = opt/sabnzbd/sabnzbd.ini
- source = http://downloads.sourceforge.net/sabnzbdplus/SABnzbd-0.7.20-src.tar.gz
- source = sabnzbd
- source = sabnzbd.desktop
- source = addnzb.sh
- source = nzb-2.png
- source = sab2_64.png
- source = x-nzb.xml
- source = sabnzbd.service
- source = sabnzbd.confd
- md5sums = 7972b2cdad0a3431262611c271ce5747
- md5sums = 48d60a1c626503c7fef1bc5374390513
- md5sums = f9bd5485072714b11f8c30a28024dc4d
- md5sums = 69b9bcbcf67ff3e7a4cdd9f26e001341
- md5sums = 2a49c07b1e3e6448eabe92644315f983
- md5sums = fdc878dd0f6f25617e627b04409abbbd
- md5sums = 11fb2cd1451e3725b08bfc2bd045be54
- md5sums = 7da9222f3b86abfed590950f48dc2e77
- md5sums = 8fc2607a7961fc643ef4f6640166322a
-
-pkgname = sabnzbd
-
diff --git a/.SRCINFO b/.SRCINFO
index 50c88979a3bb..dfb58688e6f4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,47 +1,62 @@
pkgbase = sabnzbd
pkgdesc = A web-interface based binary newsgrabber with NZB file support
- pkgver = 2.3.9
+ pkgver = 4.3.1
pkgrel = 1
url = http://www.sabnzbd.org
install = sabnzbd.install
arch = any
license = GPL
+ depends = apprise
depends = curl
depends = par2cmdline
- depends = python2
- depends = python2-cheetah
- depends = python2-sabyenc
+ depends = python
+ depends = python-babelfish
+ depends = python-cffi
+ depends = python-chardet
+ depends = python-cheetah3
+ depends = python-cheroot
+ depends = python-cherrypy
+ depends = python-configobj
+ depends = python-cryptography
+ depends = python-dateutil
+ depends = python-feedparser
+ depends = python-guessit
+ depends = python-jaraco.classes
+ depends = python-jaraco.collections
+ depends = python-jaraco.context
+ depends = python-jaraco.functools
+ depends = python-jaraco.text
+ depends = python-more-itertools
+ depends = python-notify2
+ depends = python-portend
+ depends = python-portend
+ depends = python-puremagic
+ depends = python-pycparser
+ depends = python-pysocks
+ depends = python-pytz
+ depends = python-rebulk
+ depends = python-sabyenc3
+ depends = python-sabctools
+ depends = python-sgmllib3k
+ depends = python-six
+ depends = python-tempora
+ depends = python-zc.lockfile
depends = sqlite
depends = unrar
depends = unzip
- optdepends = xdg-utils: registration of .nzb files
- optdepends = python2-feedparser: rss support
- optdepends = python2-pyopenssl: ssl support
- optdepends = par2cmdline-tbb: par2 multi-threading
- backup = etc/conf.d/sabnzbd
- backup = opt/sabnzbd/sabnzbd.ini
- source = https://github.com/sabnzbd/sabnzbd/releases/download/2.3.9/SABnzbd-2.3.9-src.tar.gz
- source = sabnzbd
- source = sabnzbd.desktop
- source = addnzb.sh
- source = nzb.png
- source = sabnzbd.png
- source = x-nzb.xml
+ optdepends = p7zip: for .7z support
+ optdepends = dbus-python: for system power management
+ optdepends = python-orjson: ~2x faster than ujson, requires rust
+ backup = var/lib/sabnzbd/sabnzbd.ini
+ source = https://github.com/sabnzbd/sabnzbd/releases/download/4.3.1/SABnzbd-4.3.1-src.tar.gz
source = sabnzbd.service
+ source = sabnzbd@.service
source = sabnzbd.sysusers
source = sabnzbd.tmpfiles
- source = sabnzbd.confd
- sha256sums = f3ab6dffba914e6ddf88f1a755ec3ebaa95f0bdbec6f04b7bf0f90822249bb0c
- sha256sums = 82630edfc767a383843ffaae9d716e99010dad9e93bdee08d541faa74e694a65
- sha256sums = 887f93942b78c0475009b1ce84b502c28e273c222451a4736cd4c37ff5454f04
- sha256sums = 30ffff8b9c00e91358cd6c5dca89f9d9f8f12843e7b3c44c6d5b0f09b0ea424a
- sha256sums = ef8f4fb1a3a0750c74b7addd302ab8733187ad370b5d27336afb2677d7154571
- sha256sums = fce3e065d017ce3bc4548a766f25c95f982af4f6085263c72f3000f49d810409
- sha256sums = f53261d7578c67fb9fd6a639df94cd53604bcf37b9b03a926cb03e5214b496fe
- sha256sums = 3de9c07d7731a9756a60691c56897b1cb0c802c5eb510a7bb68b9e1c82d7102c
- sha256sums = 8cdeae7e8fa327bafc2fd1b19c1995f89f52b2ba231c8305b4e7269ab9e0738a
- sha256sums = f86a23384e430b79b328167262216ad315ef89c4a2c49276e6d25c5f7b4cf5bf
- sha256sums = 8462203454d488b5d4f7beb85e61da2efa42d3dffa465f3bf16a95abe0bc7c0a
+ sha256sums = c9902c212df3e6b7208c850e6ceab244afc4b3e173459c425db9be4df902bd44
+ sha256sums = 4271446ec586c41c94d61fb0eb2b8854a40246a5af24b36ff80f5438becd6fc3
+ sha256sums = fcc4e5a9ff4bc28cf4dd9fdb28f1ebd440669e630d8677a1afbef97349ac7466
+ sha256sums = 525f294372963fde09db08b0368c80078a16d4cefcb34f8179706336709afdf7
+ sha256sums = 3a3c292020cca0251478c70a6499afa64aeca3dfcb6d5e32f6e21d5d4d94fa81
pkgname = sabnzbd
-
diff --git a/PKGBUILD b/PKGBUILD
index 673fd4ca5abe..e81a07f690cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,72 +1,87 @@
+# Maintainer: Donald Webster <fryfrog@gmail.com>
+
pkgname=sabnzbd
-_pkgname=SABnzbd
-pkgver=2.3.9
+pkgver=4.3.1
pkgrel=1
pkgdesc='A web-interface based binary newsgrabber with NZB file support'
url='http://www.sabnzbd.org'
arch=('any')
license=('GPL')
-depends=('curl'
- 'par2cmdline'
- 'python2'
- 'python2-cheetah'
- 'python2-sabyenc'
- 'sqlite'
- 'unrar'
- 'unzip')
+depends=(
+ 'apprise'
+ 'curl'
+ 'par2cmdline'
+ 'python'
+ 'python-babelfish'
+ 'python-cffi'
+ 'python-chardet'
+ 'python-cheetah3'
+ 'python-cheroot'
+ 'python-cherrypy'
+ 'python-configobj'
+ 'python-cryptography'
+ 'python-dateutil'
+ 'python-feedparser'
+ 'python-guessit'
+ 'python-jaraco.classes'
+ 'python-jaraco.collections'
+ 'python-jaraco.context'
+ 'python-jaraco.functools'
+ 'python-jaraco.text'
+ 'python-more-itertools'
+ 'python-notify2'
+ 'python-portend'
+ 'python-portend'
+ 'python-puremagic'
+ 'python-pycparser'
+ 'python-pysocks'
+ 'python-pytz'
+ 'python-rebulk'
+ 'python-sabyenc3'
+ 'python-sabctools'
+ 'python-sgmllib3k'
+ 'python-six'
+ 'python-tempora'
+ 'python-zc.lockfile'
+ 'sqlite'
+ 'unrar'
+ 'unzip'
+)
+
+optdepends=(
+ 'p7zip: for .7z support'
+ 'dbus-python: for system power management'
+ 'python-orjson: ~2x faster than ujson, requires rust'
+)
-optdepends=('xdg-utils: registration of .nzb files'
- 'python2-feedparser: rss support'
- 'python2-pyopenssl: ssl support'
- 'par2cmdline-tbb: par2 multi-threading')
+backup=('var/lib/sabnzbd/sabnzbd.ini')
install='sabnzbd.install'
-backup=('etc/conf.d/sabnzbd' 'opt/sabnzbd/sabnzbd.ini')
-source=("https://github.com/sabnzbd/sabnzbd/releases/download/${pkgver}/${_pkgname}-${pkgver}-src.tar.gz"
- 'sabnzbd'
- 'sabnzbd.desktop'
- 'addnzb.sh'
- 'nzb.png'
- 'sabnzbd.png'
- 'x-nzb.xml'
- 'sabnzbd.service'
- 'sabnzbd.sysusers'
- 'sabnzbd.tmpfiles'
- 'sabnzbd.confd')
-sha256sums=('f3ab6dffba914e6ddf88f1a755ec3ebaa95f0bdbec6f04b7bf0f90822249bb0c'
- '82630edfc767a383843ffaae9d716e99010dad9e93bdee08d541faa74e694a65'
- '887f93942b78c0475009b1ce84b502c28e273c222451a4736cd4c37ff5454f04'
- '30ffff8b9c00e91358cd6c5dca89f9d9f8f12843e7b3c44c6d5b0f09b0ea424a'
- 'ef8f4fb1a3a0750c74b7addd302ab8733187ad370b5d27336afb2677d7154571'
- 'fce3e065d017ce3bc4548a766f25c95f982af4f6085263c72f3000f49d810409'
- 'f53261d7578c67fb9fd6a639df94cd53604bcf37b9b03a926cb03e5214b496fe'
- '3de9c07d7731a9756a60691c56897b1cb0c802c5eb510a7bb68b9e1c82d7102c'
- '8cdeae7e8fa327bafc2fd1b19c1995f89f52b2ba231c8305b4e7269ab9e0738a'
- 'f86a23384e430b79b328167262216ad315ef89c4a2c49276e6d25c5f7b4cf5bf'
- '8462203454d488b5d4f7beb85e61da2efa42d3dffa465f3bf16a95abe0bc7c0a')
+source=(
+ "https://github.com/sabnzbd/sabnzbd/releases/download/${pkgver}/SABnzbd-${pkgver}-src.tar.gz"
+ 'sabnzbd.service'
+ 'sabnzbd@.service'
+ 'sabnzbd.sysusers'
+ 'sabnzbd.tmpfiles'
+)
+
+sha256sums=('c9902c212df3e6b7208c850e6ceab244afc4b3e173459c425db9be4df902bd44'
+ '4271446ec586c41c94d61fb0eb2b8854a40246a5af24b36ff80f5438becd6fc3'
+ 'fcc4e5a9ff4bc28cf4dd9fdb28f1ebd440669e630d8677a1afbef97349ac7466'
+ '525f294372963fde09db08b0368c80078a16d4cefcb34f8179706336709afdf7'
+ '3a3c292020cca0251478c70a6499afa64aeca3dfcb6d5e32f6e21d5d4d94fa81')
package() {
- mkdir -p "${pkgdir}/opt/sabnzbd"
- touch "${pkgdir}/opt/sabnzbd/sabnzbd.ini"
- cp -r "${srcdir}/SABnzbd-${pkgver}/"* "${pkgdir}/opt/sabnzbd"
+ mkdir -p "${pkgdir}/usr/lib/sabnzbd"
+ cp -r "${srcdir}/SABnzbd-${pkgver}/"* "${pkgdir}/usr/lib/sabnzbd"
- # Fix for issues with Python 3
- find "${pkgdir}/opt/sabnzbd" -type f -exec sed -i 's/python/python2/g' {} \;
- find "${pkgdir}/opt/sabnzbd" -type d -exec chmod 755 {} \;
- find "${pkgdir}/opt/sabnzbd" -type f -exec chmod 644 {} \;
- chmod 755 "${pkgdir}/opt/sabnzbd/SABnzbd.py"
-
- install -D -m 755 "${srcdir}/sabnzbd" "${pkgdir}/usr/bin/sabnzbd"
- install -D -m 644 "${srcdir}/sabnzbd.confd" "${pkgdir}/etc/conf.d/sabnzbd"
+ find "${pkgdir}/usr/lib/sabnzbd" -type d -exec chmod 755 {} \;
+ find "${pkgdir}/usr/lib/sabnzbd" -type f -exec chmod 644 {} \;
+ chmod 755 "${pkgdir}/usr/lib/sabnzbd/SABnzbd.py"
install -D -m 644 "${srcdir}/sabnzbd.service" "${pkgdir}/usr/lib/systemd/system/sabnzbd.service"
+ install -D -m 644 "${srcdir}/sabnzbd@.service" "${pkgdir}/usr/lib/systemd/system/sabnzbd@.service"
install -D -m 644 "${srcdir}/sabnzbd.sysusers" "${pkgdir}/usr/lib/sysusers.d/sabnzbd.conf"
install -D -m 644 "${srcdir}/sabnzbd.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/sabnzbd.conf"
-
- install -D -m 755 "${srcdir}/sabnzbd.desktop" "${pkgdir}/usr/share/applications/sabnzbd.desktop"
- install -D -m 755 "${srcdir}/addnzb.sh" "${pkgdir}/opt/sabnzbd/addnzb.sh"
- install -D -m 644 "${srcdir}/nzb.png" "${pkgdir}/opt/sabnzbd/nzb.png"
- install -D -m 644 "${srcdir}/sabnzbd.png" "${pkgdir}/opt/sabnzbd/sabnzbd.png"
- install -D -m 770 "${srcdir}/x-nzb.xml" "${pkgdir}/opt/sabnzbd/x-nzb.xml"
}
diff --git a/addnzb.sh b/addnzb.sh
deleted file mode 100644
index e3b60513382c..000000000000
--- a/addnzb.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-. /etc/conf.d/sabnzbd
-curl -s -F apikey="$API_KEY" -F mode="addfile" -F name=@"$1" $URL/sabnzbd/api &> /dev/null
diff --git a/nzb.png b/nzb.png
deleted file mode 100644
index f443c215e529..000000000000
--- a/nzb.png
+++ /dev/null
Binary files differ
diff --git a/sab2_64.png b/sab2_64.png
deleted file mode 100644
index 2c6290006300..000000000000
--- a/sab2_64.png
+++ /dev/null
Binary files differ
diff --git a/sabnzbd b/sabnzbd
deleted file mode 100644
index 0fa0d41ddddd..000000000000
--- a/sabnzbd
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-python2 /opt/sabnzbd/SABnzbd.py -f ${HOME}/.sabnzbd.ini "${@}"
diff --git a/sabnzbd.confd b/sabnzbd.confd
deleted file mode 100644
index 389676c6196d..000000000000
--- a/sabnzbd.confd
+++ /dev/null
@@ -1,8 +0,0 @@
-# This file is used to make association of .nzb files with SABnzbd possible.
-# If you do not want this feature, you do no have to fill in these settings.
-
-# The SABnzbd url. Make sure to add a username and password if required
-URL="http://127.0.0.1:8080"
-
-# Put the API key from Config > General here
-API_KEY=""
diff --git a/sabnzbd.desktop b/sabnzbd.desktop
deleted file mode 100755
index 4ce54a2a515e..000000000000
--- a/sabnzbd.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env xdg-open
-[Desktop Entry]
-Type=Application
-Version=1.0
-Name=SABnzbd+
-GenericName=Binary Newsreader
-Icon=/opt/sabnzbd/sabnzbd.png
-Exec=sh /opt/sabnzbd/addnzb.sh %u
-Terminal=false
-Categories=Network
-MimeType=application/x-nzb
diff --git a/sabnzbd.install b/sabnzbd.install
index a0abc8266b6f..84f39473eaa1 100644
--- a/sabnzbd.install
+++ b/sabnzbd.install
@@ -1,42 +1,37 @@
-# Installation location of SABnzbd
-SABNZBD_DIR="/opt/sabnzbd" # should not be changed
-
-## arg 1: the new package version
-post_install() {
- # add x-nzb mimetype
- if [[ -f /usr/bin/xdg-mime ]]; then
- xdg-mime install --mode system "${SABNZBD_DIR}/x-nzb.xml"
- xdg-icon-resource install --context mimetypes --size 256 "${SABNZBD_DIR}/nzb.png" application-x-nzb
+post_upgrade() {
+ if [[ -d /opt/sabnzbd ]]; then
+ # Test for the *old* config file and *lack* of new config file, move if needed.
+ if [[ -f /opt/sabnzbd/sabnzbd.ini && ! -f /var/lib/sabnzbd/sabnzbd.ini ]]; then
+ cp -a /opt/sabnzbd/sabnzbd.ini /var/lib/sabnzbd/
+ mv /opt/sabnzbd/sabnzbd.ini /opt/sabnzbd/sabnzbd.ini.saved
+ echo "Copied sabnzbd.ini from /opt/sabnzbd to /var/lib/sabnzbd and renamed /opt/sabnzbd/sabnzbd.ini to /opt/sabnzbd/sabnzbd.ini.saved."
+ fi
+
+ # Test for old admin folder and *lack* of new admin folder, move if needed.
+ if [[ -d /opt/sabnzbd/admin && ! -d /var/lib/sabnzbd/admin ]]; then
+ cp -a /opt/sabnzbd/admin /var/lib/sabnzbd/
+ mv /opt/sabnzbd/admin /opt/sabnzbd/admin.saved
+ echo "Copied admin folder from /opt/sabnzbd to /var/lib/sabnzbd/ and renamed /opt/sabnzbd/admin to /opt/sabnzbd/admin.saved."
+ fi
+
+ # Test for old logs folder and *lack* of new logs folder, move if needed.
+ if [[ -d /opt/sabnzbd/logs && ! -d /var/lib/sabnzbd/logs ]]; then
+ cp -a /opt/sabnzbd/logs /var/lib/sabnzbd/
+ mv /opt/sabnzbd/logs /opt/sabnzbd/logs.saved
+ echo "Copied logs folder from /opt/sabnzbd to /var/lib/sabnzbd/ and renamed /opt/sabnzbd/logs to /opt/sabnzbd/logs.saved."
+ fi
+
+ # Suggest removing /opt/sabnzbd.
+ echo "Remove /opt/sabnzbd if everything is working correctly from /var/lib/sabnzbd now."
fi
- cat << "EOM"
-==> If you want to associate .nzb-files with SABnzbd, run 'xdg-mime default sabnzbd.desktop applications/x-nzb'
-EOM
-}
-
-## arg 1: the new package version
-## arg 2: the old package version
-pre_upgrade() {
- PID="$(pgrep -f SABnzbd.py)"
-
- if [ -n "${PID}" ];then
- systemctl stop sabnzbd.service
+ # Check and change the sabnzbd users home directory
+ SABNZBD_HOME="$( getent passwd sabnzbd | awk -F: '{ print $6 }' )"
+ if [[ "${SABNZBD_HOME}" != "/var/lib/sabnzbd" ]]; then
+ if usermod --home /var/lib/sabnzbd sabnzbd; then
+ echo "User sabnzbd home directory changed to /var/lib/sabnzbd."
+ else
+ echo "Error changing sabnzbd home directory, stop sabnzbd and run 'usermod --home /var/lib/sabnzbd sabnzbd' yourself."
+ fi
fi
}
-
-## arg 1: the old package version
-pre_remove() {
- pre_upgrade
-
- if [[ -f /usr/bin/xdg-mime ]]; then
- xdg-mime uninstall --mode system "${SABNZBD_DIR}/x-nzb.xml"
- xdg-icon-resource uninstall --context mimetypes --size 256 application-x-nzb
- fi
-}
-
-## arg 1: the old package version
-post_remove() {
- echo "==> There may be some files left in ${SABNZBD_DIR}."
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/sabnzbd.png b/sabnzbd.png
deleted file mode 100644
index 5770c0a9f96c..000000000000
--- a/sabnzbd.png
+++ /dev/null
Binary files differ
diff --git a/sabnzbd.service b/sabnzbd.service
index 6806b9cef3d7..43ca30797fed 100644
--- a/sabnzbd.service
+++ b/sabnzbd.service
@@ -1,11 +1,22 @@
+# Be sure to use `systemctl edit radarr` to modify this service with an override.conf because
+# direct changes will be overwritten by package updates.
+#
+# A user per service w/ shared group setup would have an override like:
+# [Service]
+# Group=sharedgroupname
+# UMask=002
+
[Unit]
Description=SABnzbd binary newsreader
-After=network.target
+Wants=network-online.target
+After=network-online.target
[Service]
-ExecStart=/opt/sabnzbd/SABnzbd.py -l0 -f /opt/sabnzbd/sabnzbd.ini
+Type=simple
User=sabnzbd
Group=sabnzbd
+SyslogIdentifier=sabnzbd
+ExecStart=/usr/lib/sabnzbd/SABnzbd.py --logging 0 --config-file /var/lib/sabnzbd/sabnzbd.ini
[Install]
WantedBy=multi-user.target
diff --git a/sabnzbd.sysusers b/sabnzbd.sysusers
index fc46a6c0ed75..b41895c15467 100644
--- a/sabnzbd.sysusers
+++ b/sabnzbd.sysusers
@@ -1 +1 @@
-u sabnzbd - "SABnzbd daemon" /opt/sabnzbd
+u sabnzbd - "SABnzbd daemon" /var/lib/sabnzbd
diff --git a/sabnzbd.tmpfiles b/sabnzbd.tmpfiles
index aa016100a5a0..493e976dda08 100644
--- a/sabnzbd.tmpfiles
+++ b/sabnzbd.tmpfiles
@@ -1,4 +1,4 @@
# Override this file with a modified version in /etc/tmpfiles.d/
-d /opt/sabnzbd 0755 sabnzbd sabnzbd
-Z /opt/sabnzbd - sabnzbd sabnzbd
-L /var/log/sabnzbd - - - - /opt/sabnzbd/logs/
+d /var/lib/sabnzbd 0755 sabnzbd sabnzbd
+Z /var/lib/sabnzbd - sabnzbd sabnzbd
+L /var/log/sabnzbd - - - - /var/lib/sabnzbd/logs/
diff --git a/sabnzbd@.service b/sabnzbd@.service
new file mode 100644
index 000000000000..21e9f8843c0e
--- /dev/null
+++ b/sabnzbd@.service
@@ -0,0 +1,28 @@
+# copy or _hard_link to
+# Debian: /lib/systemd/system/sabnzbd@.service
+# others: /usr/lib/systemd/system/sabnzbd@.service
+#
+# To start SABNzbd once for USER use:
+# systemctl start sabnzbd@USER.service
+#
+# To enable and start SABNzbd for USER use:
+# systemctl enable --now sabnzbd@USER.service
+#
+# Config will be placed in ~USER/.sabnzbd/
+
+[Unit]
+Description=SABnzbd binary newsreader
+Documentation=https://sabnzbd.org/wiki/
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+# Default location is ~/.sabnzbd/sabnzbd.ini, but package previously used ~/.sabnzbd.ini so default to that
+ExecStart=/usr/lib/sabnzbd/SABnzbd.py --logging 1 --browser 0 --config-file /home/%I/.sabnzbd.ini
+User=%I
+Group=%I
+Type=simple
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/x-nzb.xml b/x-nzb.xml
deleted file mode 100644
index e77d2841031d..000000000000
--- a/x-nzb.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
- <mime-type type="application/x-nzb">
-
- <comment xml:lang='en'>An XML-based file format for retrieving posts from NNTP (Usenet) servers</comment>
- <sub-class-of type="application/xml"/>
- <glob pattern="*.nzb"/>
-
- </mime-type>
-</mime-info>