diff options
Diffstat (limited to 'www/campsite/files/pkg-install.in')
-rw-r--r-- | www/campsite/files/pkg-install.in | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/www/campsite/files/pkg-install.in b/www/campsite/files/pkg-install.in new file mode 100644 index 000000000000..afebd21d56de --- /dev/null +++ b/www/campsite/files/pkg-install.in @@ -0,0 +1,29 @@ +#! /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 |