summaryrefslogtreecommitdiff
path: root/pcr/i2p/i2p.install
diff options
context:
space:
mode:
authorFreemor <freemor@freemor.ca>2019-09-12 07:33:47 -0300
committerFreemor <freemor@freemor.ca>2019-09-12 07:33:47 -0300
commitc2aa7d60f16fd39618e0686b0b20a48e2f0dad14 (patch)
tree23eefb04b339e2b16776ecc3dda00ef48abeddb0 /pcr/i2p/i2p.install
parentafc60fa3536c4255683946cde2c9982f06d380ff (diff)
downloadabslibre-c2aa7d60f16fd39618e0686b0b20a48e2f0dad14.tar.gz
abslibre-c2aa7d60f16fd39618e0686b0b20a48e2f0dad14.tar.bz2
abslibre-c2aa7d60f16fd39618e0686b0b20a48e2f0dad14.zip
Keep [pcr/i2p] up-to-date.
Diffstat (limited to 'pcr/i2p/i2p.install')
-rw-r--r--pcr/i2p/i2p.install31
1 files changed, 17 insertions, 14 deletions
diff --git a/pcr/i2p/i2p.install b/pcr/i2p/i2p.install
index 146cac383..68c5726b2 100644
--- a/pcr/i2p/i2p.install
+++ b/pcr/i2p/i2p.install
@@ -1,21 +1,24 @@
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 "==> "
}
+## 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
+ 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
}
-pre_remove() {
- getent passwd i2p &>/dev/null && {
- echo -n ">>> Removing i2p user... "
- userdel i2p
- echo "done"
- }
+post_remove() {
+ rm -f /opt/i2p/lib*.so*
}