freebsd-ports/sysutils/bsdsar/pkg-install
Yen-Ming Lee 8ff9b87bcf update bsdsar_gather's arguments in pkg-install
Submitted by:	leafy <leafy@leafy.idv.tw>
Reviewed by:	eric@trinitel.com
Approved by:	eric@trinitel.com
2003-08-15 04:16:27 +00:00

32 lines
732 B
Bash

#!/bin/sh
#
PKG_PREFIX=${PKG_PREFIX:-/usr/local}
# Verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
: nothing to pre-install for this port
;;
POST-INSTALL)
echo "Adding 2 lines to /etc/crontab ..."
echo "# bsdsar execution" >> /etc/crontab
echo "20,40 8-18 * * * root $PKG_PREFIX/bin/bsdsar_gather" >> /etc/crontab
echo "0 * * * * root $PKG_PREFIX/bin/bsdsar_gather" >> /etc/crontab
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0