summaryrefslogtreecommitdiff
path: root/pcr/i2p/i2p.install
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/i2p/i2p.install')
-rw-r--r--pcr/i2p/i2p.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/pcr/i2p/i2p.install b/pcr/i2p/i2p.install
new file mode 100644
index 000000000..146cac383
--- /dev/null
+++ b/pcr/i2p/i2p.install
@@ -0,0 +1,21 @@
+post_install() {
+ getent passwd i2p &>/dev/null || {
+ echo -n ">>> Creating i2p user... "
+ useradd --system --user-group --home /opt/i2p i2p
+ echo "done"
+ }
+ post_upgrade
+}
+
+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"
+ }
+}