freebsd-ports/www/campsite/files/pkg-install.in
Pav Lucistnik 6b36b7e80e New port: www/campsite - The free and open multilingual web publishing tool for
news sites

PR:		ports/89243
Submitted by:	Ondra Koutek <koutek@o-k.cz>
2005-11-19 20:48:03 +00:00

29 lines
836 B
Bash

#! /bin/sh
#
PATH=/bin:/usr/bin:/usr/sbin
case $2 in
POST-INSTALL)
echo "---> Starting post-install script:"
echo "---> Checking crontab(5) file for user \"root\""
if /usr/bin/crontab -u root -l >/tmp/csctab$$ 2>&1 ; then
if test -s /tmp/csctab$$; then
echo "---> \"root\" already has a crontab. Not overwriting it"
echo "---> Please merge any changes from the standard crontab file"
echo "---> %%PREFIX%%/campsite/etc/crontab.in"
else
echo "---> Installing crontab(5) file for user \"root\""
/usr/bin/crontab -u root "%%PREFIX%%/campsite/etc/crontab.in" || exit 1
fi
else
echo "---> Creating crontab(5) file for user \"root\""
/usr/bin/crontab -u root "%%PREFIX%%/campsite/etc/crontab.in" || exit 1
fi
rm -f /tmp/csctab$$
;;
esac