summaryrefslogtreecommitdiff
path: root/pcr/i2p/i2p.install
diff options
context:
space:
mode:
authorGaming4JC <g4jc@openmailbox.org>2017-03-04 08:49:53 -0500
committerGaming4JC <g4jc@openmailbox.org>2017-03-04 08:49:53 -0500
commit0252d3f29a493d834121df40f2e16298e20f949e (patch)
tree20bdffa7f41db69895d93671fe6fde02e71fe15c /pcr/i2p/i2p.install
parentd2a10d19460a35fbe7f75dc408791dbbfe7edc6d (diff)
downloadabslibre-0252d3f29a493d834121df40f2e16298e20f949e.tar.gz
abslibre-0252d3f29a493d834121df40f2e16298e20f949e.tar.bz2
abslibre-0252d3f29a493d834121df40f2e16298e20f949e.zip
add i2p to pcr
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"
+ }
+}