summaryrefslogtreecommitdiffstats
path: root/amavisd-new/amavisd-new.install
blob: afa5b2ee9feec109e193a6c74a3437aa763361a3 (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
27
28
29
30
31
32
33
34
35
post_install()
{

	[ -z "`grep '^amavis::' /etc/group`" ] && groupadd -g 333 amavis >& /dev/null

	[ -z "`grep '^amavis:' /etc/passwd`" ] && useradd -u 333 -d /home/amavis -g amavis -s /bin/false amavis

	[ ! -d /home/amavis ] && mkdir /home/amavis

	[ ! -d /home/amavis/tmp ] && mkdir /home/amavis/tmp

	[ ! -d /home/amavis/var ] && mkdir /home/amavis/var

	[ ! -d /home/amavis/db ] && mkdir /home/amavis/db

	[ ! -d /home/amavis/quarantine ] && mkdir /home/amavis/quarantine

	chown -R amavis:amavis /home/amavis

	chmod -R 750 /home/amavis

}

post_upgrade()
{

	post_install

}

op=$1

shift

$op $*