#! /bin/sh # # $FreeBSD$ PATH=/bin:/usr/bin:/usr/sbin case $2 in POST-INSTALL) echo "---> Starting post-install script:" /bin/chmod g+s "%%MAILMANDIR%%" || exit 1 echo "---> Checking crontab(5) file for user \"%%USER%%\"" if [ -e /var/cron/allow ]; then echo "%%USER%%" >> /var/cron/allow fi if /usr/bin/crontab -u "%%USER%%" -l >/tmp/mmctab$$ 2>&1 ; then if test -s /tmp/mmctab$$; then echo "---> \"%%USER%%\" already has a crontab. Not overwriting it" echo "---> Please merge any changes from the standard crontab file" echo "---> %%MAILMANDIR%%/cron/crontab.in" else echo "---> Installing crontab(5) file for user \"%%USER%%\"" /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" || exit 1 fi else echo "---> Creating crontab(5) file for user \"%%USER%%\"" /usr/bin/crontab -u "%%USER%%" "%%MAILMANDIR%%/cron/crontab.in" || exit 1 fi rm -f /tmp/mmctab$$ echo "---> Checking (and fixing) file and directory permissions" %%MAILMANDIR%%/bin/check_perms -f >/dev/null 2>&1 ;; esac