diff options
author | felics@felics-tablet | 2016-09-20 21:50:47 +0200 |
---|---|---|
committer | felics@felics-tablet | 2016-09-20 21:50:47 +0200 |
commit | b61b8085f8f28bc23b58fec207e50f43d6c90e7d (patch) | |
tree | 0aa2be8b3c9840a023e668f49dabf011e1bba029 | |
parent | 0cf2134eabfcbc125a79efaf953cf9509ddfb833 (diff) | |
download | aur-b61b8085f8f28bc23b58fec207e50f43d6c90e7d.tar.gz |
Changed the way we do permissions of /var/spool/wwwoffle.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | wwwoffle.install | 11 |
3 files changed, 14 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = wwwoffle-svn pkgdesc = Simple caching proxy server with special features (request, recursive fetch, abonnement, modify HTML, ...) for use with dial-up internet links. Includes startup scripts for OpenRC, System V init, systemd. pkgver = 2.9j+svn2227 - pkgrel = 2 + pkgrel = 3 epoch = 1 url = http://www.gedanken.org.uk/software/wwwoffle/ install = wwwoffle.install @@ -38,7 +38,7 @@ pkgbase = wwwoffle-svn sha256sums = 090329f13d8889a3e6e3b46b3f9de152eea0963b71c10a2a7dbafb7bb7e17120 sha256sums = 04fd88f2a100e3ff9a96da6a70e58457252722cbf6350ffdbf08f17e62b64869 sha256sums = 3938777ba2baa7faac569d4a4a8a8cb7adeef786cfa84e991b6f03e991bcfae8 - sha256sums = 1b5ac98fff7a5c7b32439410cffdbdd8224c19fe8ca02db948d1a4430de793fd + sha256sums = 5d31c140b112cf3fdd8069b4049bbd13fc91699d87086a3118381e21a3aa0f8e pkgname = wwwoffle-svn @@ -7,7 +7,7 @@ pkgname="${_pkgname}-svn" # _pkgver=2.9i epoch=1 pkgver=2.9j+svn2227 -pkgrel=2 +pkgrel=3 pkgdesc="Simple caching proxy server with special features (request, recursive fetch, abonnement, modify HTML, ...) for use with dial-up internet links. Includes startup scripts for OpenRC, System V init, systemd." arch=('i686' 'x86_64' 'arm' 'arm64') url="http://www.gedanken.org.uk/software/wwwoffle/" @@ -59,7 +59,7 @@ sha256sums=( '090329f13d8889a3e6e3b46b3f9de152eea0963b71c10a2a7dbafb7bb7e17120' # initscript_openrc '04fd88f2a100e3ff9a96da6a70e58457252722cbf6350ffdbf08f17e62b64869' # initscript_systemd '3938777ba2baa7faac569d4a4a8a8cb7adeef786cfa84e991b6f03e991bcfae8' # initscript_sysvinit - '1b5ac98fff7a5c7b32439410cffdbdd8224c19fe8ca02db948d1a4430de793fd' # ${install} + '5d31c140b112cf3fdd8069b4049bbd13fc91699d87086a3118381e21a3aa0f8e' # ${install} ) _pgmver() { @@ -196,4 +196,7 @@ package() { ### Move config into final place (such that it is not automatically used, but user actually has to do some manual work). mv "${pkgdir}/etc/wwwoffle/wwwoffle.conf" "${pkgdir}/etc/wwwoffle/wwwoffle.conf.template" + + ### Set permissions of spool directory. + chmod -R ug=Xwr "${pkgdir}/var/spool/wwwoffle" } diff --git a/wwwoffle.install b/wwwoffle.install index 3b4c2ec7e8e9..731f05aa6993 100644 --- a/wwwoffle.install +++ b/wwwoffle.install @@ -39,13 +39,16 @@ post_upgrade() { echo "Set bind-ipv4 = none in wwwoffle.conf if you get ipv4 related warnings." echo "" echo "-------------------" - if [ ! `grep wwwoffle /etc/group` ]; then + if [ ! `grep -E '^wwwoffle\:' /etc/group` ]; then echo ">>> Adding group wwwoffle." - groupadd wwwoffle &> /dev/null; + groupadd wwwoffle &> /dev/null fi + if [ ! `grep -E '^wwwoffle\:' /etc/passwd` ]; then id wwwoffle &> /dev/null || \ - (echo ">>> Adding user wwwoffle." && useradd -g wwwoffle wwwoffle) - chown -R wwwoffle:wwwoffle /var/spool/wwwoffle /etc/wwwoffle + echo ">>> Adding user wwwoffle." + useradd -g wwwoffle wwwoffle + fi + chown -R wwwoffle:wwwoffle /var/spool/wwwoffle } pre_remove() { |