diff options
author | skydrome | 2019-02-24 05:22:36 -0500 |
---|---|---|
committer | skydrome | 2019-02-24 05:22:36 -0500 |
commit | 979bb949a13b236a1f11137e9dd8b48c1a99bec6 (patch) | |
tree | 2d1687245d2fa0e47ddb5ef9975d7dfb4f2c980e /i2p.install | |
parent | 27d9f7ac14cb052a9cd6282e88331a49e0f8e1f7 (diff) | |
download | aur-979bb949a13b236a1f11137e9dd8b48c1a99bec6.tar.gz |
create user with systemd
Diffstat (limited to 'i2p.install')
-rwxr-xr-x | i2p.install | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/i2p.install b/i2p.install index 146cac383979..54b9ec2ac9d0 100755 --- a/i2p.install +++ b/i2p.install @@ -1,21 +1,20 @@ post_install() { - getent passwd i2p &>/dev/null || { - echo -n ">>> Creating i2p user... " - useradd --system --user-group --home /opt/i2p i2p - echo "done" - } - post_upgrade + echo "==> " + echo "==> I2P Router settings can be adjusted at" + echo "==> http://127.0.0.1:7657/config.jsp" + echo "==> " + post_upgrade } - +## arg 1: the new package version +## arg 2: the old package version post_upgrade() { - systemd-tmpfiles --create i2prouter.conf - chown -R i2p:i2p /opt/i2p -} - -pre_remove() { - getent passwd i2p &>/dev/null && { - echo -n ">>> Removing i2p user... " - userdel i2p - echo "done" + if (( $(vercmp $2 0.9.39) < 0 )); then + [[ $(id -g i2p) != '985' ]] && { + echo -n ">>> Updating i2p user..." + groupmod --gid 985 i2p + usermod --uid 985 -s /bin/sh i2p + chown -R 985:985 /opt/i2p + echo " done" } + fi } |