Date: Saturday, August 15, 2015 @ 19:30:18 Author: seblu Revision: 138387
upgpkg: znc 1.6.1-1 - switch to dynamic user Modified: znc/trunk/PKGBUILD znc/trunk/znc.install znc/trunk/znc.sysusers --------------+ PKGBUILD | 2 +- znc.install | 6 +++--- znc.sysusers | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2015-08-15 17:10:14 UTC (rev 138386) +++ PKGBUILD 2015-08-15 17:30:18 UTC (rev 138387) @@ -20,7 +20,7 @@ source=("http://znc.in/releases/$pkgname-$pkgver.tar.gz" "$pkgname.sysusers") md5sums=('8e29289e6229b6d2473de202170745ab' - '48dd51ac68c52d9700f38e3db1a2a7be') + '919705dccc42d3bff1549d3b3680e55a') build() { cd $pkgname-$pkgver Modified: znc.install =================================================================== --- znc.install 2015-08-15 17:10:14 UTC (rev 138386) +++ znc.install 2015-08-15 17:30:18 UTC (rev 138387) @@ -3,7 +3,7 @@ # arg 1: the new package version post_install() { systemd-sysusers znc.conf - [ -d /var/lib/znc ] || install -dm 750 -o znc -g znc /var/lib/znc + [[ -d /var/lib/znc ]] || install -dm 750 -o znc -g znc /var/lib/znc echo "==> Use 'znc --makeconf' as user znc to generate your first config" } @@ -10,8 +10,8 @@ # arg 1: the new package version # arg 2: the old package version post_upgrade() { - if [ "`vercmp $2 1.0-4`" -lt 0 ]; then - [ -d /var/lib/znc ] || install -dm 750 -o znc -g znc /var/lib/znc + if (( "$(vercmp $2 1.0-4)" < 0 )); then + [[ -d /var/lib/znc ]] || install -dm 750 -o znc -g znc /var/lib/znc usermod -d /var/lib/znc znc 2>/dev/null && echo '==> znc home directory has moved to /var/lib/znc' fi : Modified: znc.sysusers =================================================================== --- znc.sysusers 2015-08-15 17:10:14 UTC (rev 138386) +++ znc.sysusers 2015-08-15 17:30:18 UTC (rev 138387) @@ -1 +1 @@ -u znc 136 - /var/lib/znc +u znc - - /var/lib/znc