diff options
author | Donald Webster | 2016-02-20 14:02:28 -0800 |
---|---|---|
committer | Donald Webster | 2016-02-20 14:04:24 -0800 |
commit | a9a348b9b2bd7b5796dea86f4a51c68f6ba5b501 (patch) | |
tree | 66e0baa90f171667ed857a44371b90ad09aff456 | |
parent | 2132f0a11b381e876343ccc900af3281e23496c2 (diff) | |
download | aur-a9a348b9b2bd7b5796dea86f4a51c68f6ba5b501.tar.gz |
Switch to sysusers like plex-media-server-plexpass.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | lazylibrarian.install | 9 | ||||
-rw-r--r-- | lazylibrarian.sysusers | 1 |
4 files changed, 16 insertions, 11 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Sat Feb 20 18:40:09 UTC 2016 +# Sat Feb 20 22:04:11 UTC 2016 pkgbase = lazylibrarian-git pkgdesc = Automatic Book Downloading via NZBs & Torrent pkgver = 736.d66f7e9 @@ -12,8 +12,10 @@ pkgbase = lazylibrarian-git depends = python2 source = git://github.com/DobyTang/LazyLibrarian.git source = lazylibrarian.service + source = lazylibrarian.sysusers sha256sums = SKIP sha256sums = 5010608e99e0242ba7c74b401efed0968984fd9a0ba1b9995dca22d6b8da8519 + sha256sums = 94791f40c9997526304b8a18d63fd555b30871efbebbc647a4e020222967becd pkgname = lazylibrarian-git @@ -11,8 +11,16 @@ license=('GPL3') depends=('python2') makedepends=('git') install='lazylibrarian.install' -source=('git://github.com/DobyTang/LazyLibrarian.git' 'lazylibrarian.service') -sha256sums=('SKIP' '5010608e99e0242ba7c74b401efed0968984fd9a0ba1b9995dca22d6b8da8519') +source=( + 'git://github.com/DobyTang/LazyLibrarian.git' + 'lazylibrarian.service' + 'lazylibrarian.sysusers' +) +sha256sums=( + 'SKIP' + '5010608e99e0242ba7c74b401efed0968984fd9a0ba1b9995dca22d6b8da8519' + '94791f40c9997526304b8a18d63fd555b30871efbebbc647a4e020222967becd' +) pkgver() { cd $_gitname @@ -24,4 +32,5 @@ package() { cp -r "$srcdir/$_gitname" "${pkgdir}/opt/lazylibrarian" install -Dm644 "${srcdir}/lazylibrarian.service" "${pkgdir}/usr/lib/systemd/system/lazylibrarian.service" + install -Dm644 "${srcdir}/lazylibrarian.sysusers" "${pkgdir}/usr/lib/sysusers.d/lazylibrarian.conf" } diff --git a/lazylibrarian.install b/lazylibrarian.install index e4bfc7ffccf6..658f026e2211 100644 --- a/lazylibrarian.install +++ b/lazylibrarian.install @@ -4,8 +4,7 @@ CP_DIR="/opt/lazylibrarian" ## arg 1: the new package version post_install() { - groupadd ${CP_GROUP} &> /dev/null - useradd -g ${CP_GROUP} -d ${CP_DIR} -s /bin/false ${CP_USER} &> /dev/null + systemd-sysusers lazylibrarian.conf chown -R ${CP_USER}:${CP_GROUP} ${CP_DIR} echo " >> If you want a custom user or path for LazyLibrarian, remember to edit the service file as well." } @@ -14,9 +13,3 @@ post_install() { post_upgrade() { chown -R ${CP_USER}:${CP_GROUP} ${CP_DIR} } - -## arg 1: the old package version -post_remove() { - userdel ${CP_USER} &> /dev/null - groupdel ${CP_GROUP} &> /dev/null || /bin/true -} diff --git a/lazylibrarian.sysusers b/lazylibrarian.sysusers new file mode 100644 index 000000000000..f1789ea5b3fb --- /dev/null +++ b/lazylibrarian.sysusers @@ -0,0 +1 @@ +u lazylibrarian - "LazyLibrarian Server" /opt/lazylibrarian |