1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/bin/sh
PATH=
PKG="$1"
DST="$2"
PKGNAME=`/usr/bin/basename $1`
USAGE="Usage: $PKGNAME.post_install package_path [install_path]"
trap 'echo "FAILED (interrupted by signal)"; exit 1' 1 2 3 4 15
BEGINDATE=`/bin/date`
#FDATE=`echo $BEGINDATE | /bin/awk '{print $2 "_" $3 "_" $7 "_" $4}'`
echo $PKGNAME post-installation script starts at $BEGINDATE
failed()
{
# show failed message and exit
echo "FAILED ($*)"
exit 1
}
echo
echo "Removing the Installer remains of possible other Squid installations... "
cd /NextLibrary/Receipts
/bin/rm -rf Squid-*.pkg
/etc/chown -R nobody.other /usr/local/squid || failed "can't chown $1!"
/etc/chown root.wheel /usr/local/squid/bin/pinger || failed "can't chown $1!"
/bin/chmod 4755 /usr/local/squid/bin/pinger || failed "can't chmod $1!"
if [ -e/usr/local/squid/etc/mime.conf ]
then
echo "Already have mime.conf"
else
echo "Installing default mime.conf"
(cd /usr/local/squid/etc; /bin/cp -p mime.conf.default mime.conf)
fi
echo "(done)"
|