Files
extra/i2pd/i2pd.install
2025-06-22 20:39:04 -05:00

27 lines
557 B
Plaintext

post_install() {
if ! getent group i2pd &>/dev/null; then
groupadd -r i2pd >/dev/null
fi
if ! getent passwd i2pd &>/dev/null; then
useradd -r -g i2pd -G adm -d /var/lib/i2pd -s /bin/nologin i2pd >/dev/null
fi
if ! groups i2pd | grep adm &>/dev/null; then
gpasswd -a i2pd adm >/dev/null
fi
chown -R i2pd:i2pd /var/lib/i2pd
chmod 700 /var/lib/i2pd
}
post_upgrade() {
post_install
}
post_remove() {
if getent passwd i2pd &>/dev/null; then
userdel i2pd >/dev/null
fi
if getent group i2pd &>/dev/null; then
groupdel i2pd >/dev/null
fi
}