File: fetchmail.postinst

package info (click to toggle)
fetchmail 6.2.5-12sarge5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,048 kB
  • ctags: 2,362
  • sloc: ansic: 19,329; sh: 3,735; python: 1,797; perl: 564; makefile: 501; yacc: 461; lex: 262; awk: 124; sed: 93; lisp: 84
file content (31 lines) | stat: -rw-r--r-- 735 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
24
25
26
27
28
29
30
31
#!/bin/sh
#
# Postinst script for fetchmail
# $Id: fetchmail.postinst 132 2004-04-07 04:55:48Z bob $
#

set -e

# Create fetchmail user and its homedir if we may need it
adduser --system --ingroup nogroup --home /var/run/fetchmail \
	--shell /bin/sh --disabled-password fetchmail >/dev/null 2>&1 || true
# work around possible adduser bug, see #119366
[ -d /var/run/fetchmail ] || mkdir -p /var/run/fetchmail
chmod 700 /var/run/fetchmail
chown -h -R fetchmail:nogroup /var/run/fetchmail

if [ -x /etc/init.d/fetchmail ]; then
	update-rc.d fetchmail defaults 99 15 >/dev/null

	if [ -x /usr/sbin/invoke-rc.d ]; then
		invoke-rc.d --quiet fetchmail start
	else
		/etc/init.d/fetchmail start
	fi
fi

#DEBHELPER#

exit 0

# vim:ts=4:sw=4: