Correction : /etc/sv/amavis/run : mkdir /run/amavis .
[lhc/ateliers.git] / etc / sv / amavis / run
1 #!/bin/sh -eux
2 exec 2>&1
3 sv=${PWD#/etc/sv/}
4
5 for dir in \
6 /var/lib/amavis \
7 /var/lib/amavis/tmp
8 do
9 if test -d "$dir"
10 then find "$dir" -maxdepth 1 -name 'amavis-*' -type d -exec rm -rf {} +
11 fi
12 done
13
14 install -d -m 770 -o "$sv" -g "$sv" \
15 /run/amavis
16
17 exec /usr/bin/chpst \
18 -u "$sv":"$sv" \
19 /usr/sbin/amavisd-new \
20 foreground