#!/bin/sh -eux exec 2>&1 sv=${PWD#/etc/sv/} for dir in \ /var/lib/amavis \ /var/lib/amavis/tmp do if test -d "$dir" then find "$dir" -maxdepth 1 -name 'amavis-*' -type d -exec rm -rf {} + fi done exec /usr/bin/chpst \ -u "$sv":"$sv" \ /usr/sbin/amavisd-new \ foreground