File: tcpcryptd.postinst

package info (click to toggle)
tcpcrypt 0.3~rc1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,292 kB
  • ctags: 1,285
  • sloc: ansic: 11,305; asm: 482; sh: 192; objc: 149; makefile: 98
file content (23 lines) | stat: -rw-r--r-- 542 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh -e

VARLIB=/var/lib/tcpcryptd
TCPCRYPT_USER=debian-tcpcryptd

case $1 in
    configure)
	# add a debian-tcpcryptd user if one does not already exist
	if ! getent passwd "$TCPCRYPT_USER" >/dev/null ; then
	    echo "adding tcpcryptd user..."
	    adduser --quiet --system --no-create-home --group \
		--home "$VARLIB" \
		--shell '/bin/false' \
		--gecos 'tcpcrypt user,,,' \
		"$TCPCRYPT_USER"
	fi        
        mkdir -p "$VARLIB"
        chown "$TCPCRYPT_USER" "$VARLIB"
        chmod 0700 "$VARLIB"
        ;;
esac

#DEBHELPER#