1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/sysutils/bsdsar/pkg-install
Akinori MUSHA b733011372 Add bsdsar, System Activity Reporter for FreeBSD.
PR:		ports/33702
Submitted by:	Yen-Ming Lee <leeym@utopia.leeym.com>
Reviewed and fixed by:	knu
2002-01-22 04:47:23 +00:00

32 lines
750 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 /var/log" >> /etc/crontab
echo "0 * * * * root $PKG_PREFIX/bin/bsdsar_gather /var/log" >> /etc/crontab
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0