Get user creation working

This commit is contained in:
Caleb Maclennan 2017-04-11 16:51:26 +03:00
parent 933a76e523
commit 78895ceee1
No known key found for this signature in database
GPG key ID: 63CC496475267693
3 changed files with 13 additions and 8 deletions

View file

@ -1,10 +1,11 @@
# Generated by mksrcinfo v8
# Tue Apr 11 13:16:53 UTC 2017
# Tue Apr 11 13:52:41 UTC 2017
pkgbase = mastodon
pkgdesc = A GNU Social-compatible microblogging server
pkgver = 1.1.1
pkgrel = 0.1
url = https://mastodon.social
install = mastodon.install
arch = i686
arch = x86_64
license = AGPL-3.0

View file

@ -10,11 +10,7 @@ license=('AGPL-3.0')
conflicts=("${pkgname}-git" "${pkgname}-docker" "${pkgname}-docker-git")
source=("https://github.com/tootsuite/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('e5b394a764710facb5830b7fad54a714aa08920017e6ecd02145bcbf70c5cded')
install=mastodon.install
_user=mastodon
_homedir="/var/lib/${pkgname}"
_shell="/bin/false"
post_install() {
getent group ${_user} > /dev/null || groupadd ${_user} > /dev/null
getent passwd ${_user} > /dev/null || useradd -d ${_homedir} -g ${_user} -s ${_shell} ${_user} > /dev/null
}
_homedir=/var/lib/mastodon
_shell=/bin/false

8
mastodon.install Normal file
View file

@ -0,0 +1,8 @@
_user=mastodon
_homedir=/var/lib/mastodon
_shell=/bin/false
post_install() {
getent group ${_user} > /dev/null || groupadd ${_user} > /dev/null
getent passwd ${_user} > /dev/null || useradd -d ${_homedir} -g ${_user} -s ${_shell} ${_user} > /dev/null
}