blob: 3462f53dad476bd583c4847eed6206756914cccb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
USER=i2pd
HOME=/var/lib/i2pd
post_install() {
getent passwd ${USER} &>/dev/null || {
echo -n ">>> Creating ${USER} user... "
useradd --system --user-group --home ${HOME} ${USER}
echo "done"
}
post_upgrade
}
post_upgrade() {
systemd-tmpfiles --create i2pd.conf
chown -R ${USER}:${USER} ${HOME}
chmod -R o-rwx ${HOME}
}
pre_remove() {
getent passwd ${USER} &>/dev/null && {
echo -n ">>> Removing ${USER} user... "
userdel ${USER}
echo "done"
}
}
|