diff options
author | Donald Webster | 2019-05-29 08:44:17 -0700 |
---|---|---|
committer | Donald Webster | 2019-05-29 08:45:36 -0700 |
commit | 0824f86c99b4cd01515bcc5f481150fa5aa4e1a5 (patch) | |
tree | a9bf0e10785cb3308430e5289c04674958e9c185 | |
parent | fa361ad66d5cf631ecae8cc73a94c96209446c67 (diff) | |
download | aur-0824f86c99b4cd01515bcc5f481150fa5aa4e1a5.tar.gz |
Convert to systemds tmpfiles.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 5 | ||||
-rw-r--r-- | sabnzbd.install | 15 | ||||
-rw-r--r-- | sabnzbd.tmpfiles | 4 |
4 files changed, 12 insertions, 14 deletions
@@ -29,6 +29,7 @@ pkgbase = sabnzbd source = x-nzb.xml source = sabnzbd.service source = sabnzbd.sysusers + source = sabnzbd.tmpfiles source = sabnzbd.confd sha256sums = f3ab6dffba914e6ddf88f1a755ec3ebaa95f0bdbec6f04b7bf0f90822249bb0c sha256sums = 82630edfc767a383843ffaae9d716e99010dad9e93bdee08d541faa74e694a65 @@ -39,6 +40,7 @@ pkgbase = sabnzbd sha256sums = f53261d7578c67fb9fd6a639df94cd53604bcf37b9b03a926cb03e5214b496fe sha256sums = 3de9c07d7731a9756a60691c56897b1cb0c802c5eb510a7bb68b9e1c82d7102c sha256sums = 8cdeae7e8fa327bafc2fd1b19c1995f89f52b2ba231c8305b4e7269ab9e0738a + sha256sums = e6310d2553fe0f65b742b15d03d82359ebb6a2ae6845c4404b8a1efabc2c918e sha256sums = 8462203454d488b5d4f7beb85e61da2efa42d3dffa465f3bf16a95abe0bc7c0a pkgname = sabnzbd @@ -31,6 +31,7 @@ source=("https://github.com/${pkgname}/${pkgname}/releases/download/${pkgver}/${ 'x-nzb.xml' "${pkgname}.service" 'sabnzbd.sysusers' + 'sabnzbd.tmpfiles' "${pkgname}.confd") sha256sums=('f3ab6dffba914e6ddf88f1a755ec3ebaa95f0bdbec6f04b7bf0f90822249bb0c' @@ -42,6 +43,7 @@ sha256sums=('f3ab6dffba914e6ddf88f1a755ec3ebaa95f0bdbec6f04b7bf0f90822249bb0c' 'f53261d7578c67fb9fd6a639df94cd53604bcf37b9b03a926cb03e5214b496fe' '3de9c07d7731a9756a60691c56897b1cb0c802c5eb510a7bb68b9e1c82d7102c' '8cdeae7e8fa327bafc2fd1b19c1995f89f52b2ba231c8305b4e7269ab9e0738a' + 'e6310d2553fe0f65b742b15d03d82359ebb6a2ae6845c4404b8a1efabc2c918e' '8462203454d488b5d4f7beb85e61da2efa42d3dffa465f3bf16a95abe0bc7c0a') package() { @@ -57,8 +59,11 @@ package() { install -Dm755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" install -Dm644 "${srcdir}/${pkgname}.confd" "${pkgdir}/etc/conf.d/${pkgname}" + install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" install -Dm644 "${srcdir}/sabnzbd.sysusers" "${pkgdir}/usr/lib/sysusers.d/sabnzbd.conf" + install -Dm644 "${srcdir}/sabnzbd.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/sabnzbd.conf" + install -Dm755 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" install -Dm755 "${srcdir}/addnzb.sh" "${pkgdir}/opt/${pkgname}/addnzb.sh" install -Dm644 "${srcdir}/nzb.png" "${pkgdir}/opt/${pkgname}/nzb.png" diff --git a/sabnzbd.install b/sabnzbd.install index dc62db60b8ec..a0abc8266b6f 100644 --- a/sabnzbd.install +++ b/sabnzbd.install @@ -1,9 +1,4 @@ -# Change these to modify the ownership of sabnzbd -# If you change this here, you also have to change -# the user and group in the systemd service file. -SABNZBD_USER="sabnzbd" -SABNZBD_GROUP="sabnzbd" - +# Installation location of SABnzbd SABNZBD_DIR="/opt/sabnzbd" # should not be changed ## arg 1: the new package version @@ -14,8 +9,6 @@ post_install() { xdg-icon-resource install --context mimetypes --size 256 "${SABNZBD_DIR}/nzb.png" application-x-nzb fi - post_upgrade - cat << "EOM" ==> If you want to associate .nzb-files with SABnzbd, run 'xdg-mime default sabnzbd.desktop applications/x-nzb' EOM @@ -31,12 +24,6 @@ pre_upgrade() { fi } -## arg 1: the new package version -## arg 2: the old package version -post_upgrade() { - chown -R "${SABNZBD_USER}:${SABNZBD_GROUP}" "${SABNZBD_DIR}" -} - ## arg 1: the old package version pre_remove() { pre_upgrade diff --git a/sabnzbd.tmpfiles b/sabnzbd.tmpfiles new file mode 100644 index 000000000000..2bbc71d62e0c --- /dev/null +++ b/sabnzbd.tmpfiles @@ -0,0 +1,4 @@ +# Override this file with a modified version in /etc/tmpfiles.d/ +d /opt/sabnzbd 0755 radarr radarr +Z /opt/sabnzbd - radarr radarr +L /var/log/sabnzbd - - - - /opt/sabnzbd/logs/ |