blob: 0bf2ed9bdb44e9284a29c40fe28397e3d649b5bd (
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
26
|
post_install() {
JAIL_DIR=/var/run/tcpcryptd
JAIL_USER=tcpcryptd
if [ ! -d "$JAIL_DIR" ]
then
echo "Creating jail directory $JAIL_DIR"
(umask 077 && mkdir $JAIL_DIR)
fi
id $JAIL_USER >/dev/null 2>&1
if [ $? -ne 0 ]
then
echo "Creating user and group '$JAIL_USER'"
useradd -s /nonexistent -d /nonexistent -M -U $JAIL_USER
fi
}
post_upgrade() {
post_install $1
}
pre_remove() {
userdel tcpcryptd &>/dev/null
groupdel tcpcryptd &>/dev/null
rm -rf /var/run/tcpcryptd
}
|