diff options
Diffstat (limited to 'i2p.install')
-rwxr-xr-x | i2p.install | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/i2p.install b/i2p.install new file mode 100755 index 000000000000..e375465ba0bb --- /dev/null +++ b/i2p.install @@ -0,0 +1,22 @@ +post_install() { + getent passwd i2p &>/dev/null || { + echo -n ">>> Creating i2p user... " + useradd --system --user-group --home /opt/i2p i2p + echo "done" + } + systemd-tmpfiles --create i2prouter.conf + chown -R i2p:i2p /opt/i2p +} + +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" + } +} |