diff options
author | Schala | 2017-02-13 17:29:13 -0800 |
---|---|---|
committer | Schala | 2017-02-13 17:29:13 -0800 |
commit | 7ca8157a9dc0896bda9d119b81b81e9d1acabbb6 (patch) | |
tree | 754abc050f82fbca5bbf2fa0c638b599795d255c | |
parent | ed1cfea1fd0f8400c8b201c75f95666e4a5ac9fd (diff) | |
download | aur-7ca8157a9dc0896bda9d119b81b81e9d1acabbb6.tar.gz |
create/update user inworldz
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | whip-server.install | 33 | ||||
-rw-r--r-- | whip-server.service | 2 |
5 files changed, 45 insertions, 6 deletions
@@ -1,20 +1,22 @@ # Generated by mksrcinfo v8 -# Tue Oct 4 22:31:04 UTC 2016 +# Tue Feb 14 01:28:36 UTC 2017 pkgbase = whip-server pkgdesc = The InWorldz WHIP distributed asset server pkgver = 5.01 - pkgrel = 1 + pkgrel = 2 url = https://github.com/InWorldz/whip-server + install = whip-server.install arch = i686 arch = x86_64 license = Apache makedepends = cmake makedepends = boost depends = boost-libs + options = emptydirs source = https://github.com/InWorldz/whip-server/archive/v5.01-win64b.tar.gz source = whip-server.service md5sums = 3174e8b1de0aabf08446ff7b8c6e2b06 - md5sums = c37ceb97e93659900f3666f349bf5001 + md5sums = d9a3fc990e7540839ada38ac42cf3e79 pkgname = whip-server diff --git a/.gitignore b/.gitignore index 848a193c4ad1..e390672927e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ pkg/ src *.gz +*.log *.tar *.xz @@ -1,17 +1,19 @@ pkgname=whip-server pkgver=5.01 _pkgsubver="-win64b" -pkgrel=1 +pkgrel=2 pkgdesc="The InWorldz WHIP distributed asset server" arch=(i686 x86_64) url="https://github.com/InWorldz/$pkgname" license=("Apache") +install=$pkgname.install source=("https://github.com/InWorldz/$pkgname/archive/v$pkgver$_pkgsubver.tar.gz" "$pkgname.service") makedepends=(cmake boost) depends=(boost-libs) +options=(emptydirs) md5sums=('3174e8b1de0aabf08446ff7b8c6e2b06' - 'c37ceb97e93659900f3666f349bf5001') + 'd9a3fc990e7540839ada38ac42cf3e79') prepare() { mkdir -p build @@ -31,5 +33,6 @@ package() { cd ../$pkgname-$pkgver$_pkgsubver install -m644 whip.cfg.sample "$pkgdir/srv/inworldz/" chmod 777 "$pkgdir/srv/inworldz/" + install -d 777 "$pkgdir/srv/inworldz/assets" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/whip-server.install b/whip-server.install new file mode 100644 index 000000000000..9066e238d203 --- /dev/null +++ b/whip-server.install @@ -0,0 +1,33 @@ +post_install() { + getent group inworldz + if [ $? -ne 0 ]; then + groupadd -r inworldz + fi + + getent passwd inworldz + if [ $? -ne 0 ]; then + useradd -r -g inworldz -d /srv/inworldz -M inworldz + fi + + chown -R inworldz:inworldz /srv/inworldz +} + +post_upgrade() { + chown -R inworldz:inworldz /srv/inworldz +} + +pre_remove() { + systemctl stop whip-server.service + systemctl disable whip-server.service +} + +post_remove() { + [[ -d /srv/inworldz ]] && chown -R root:root /srv/inworldz + + if getent passwd inworldz; then + userdel inworldz + fi + if getent group inworldz; then + groupdel inworldz + fi +} diff --git a/whip-server.service b/whip-server.service index a7edfb21ec6e..201a28daf8ef 100644 --- a/whip-server.service +++ b/whip-server.service @@ -5,7 +5,7 @@ After=local-fs.target network.target [Service] Type=simple ExecStart=/srv/inworldz/whip -ExecReload=/bin/kill -HUP $MAINPID +ExecReload=/usr/bin/kill -HUP $MAINPID KillMode=process Restart=always User=%I |