File: postinst

package info (click to toggle)
snmptt 1.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 780 kB
  • sloc: perl: 5,939; sh: 183; makefile: 8
file content (21 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -e

case "$1" in
	configure)
		if ! getent passwd snmptt >/dev/null; then
			adduser --disabled-password --system --group \
				--home /var/spool/snmptt --no-create-home \
				--gecos "SNMP Trap Translator" snmptt
		fi

		[ -d /var/log/snmptt ] || mkdir /var/log/snmptt
		[ -d /var/spool/snmptt ] || mkdir /var/spool/snmptt
		chown snmptt:snmptt /var/log/snmptt /var/spool/snmptt
	;;
esac

#DEBHELPER#

exit 0