File: postinst

package info (click to toggle)
snmptt 1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,496 kB
  • sloc: perl: 6,822; sh: 184; python: 31; makefile: 12
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