3 # PolipoPostflight gets invoked after any install or upgrade.
5 ADDSYSUSER
=$RECEIPT_PATH/addsysuser
6 if [ ! -x "$ADDSYSUSER" ]; then
7 echo "Could not find addsysuser script."
13 TARGET
=/Library
/Polipo
16 # Create user $POLIPOUSER in group daemon. If it's already there, great.
17 $ADDSYSUSER $POLIPOUSER "Polipo System user" $POLIPODIR
19 # Create the polipo direcpolipoy, if it doesn't exist.
20 if [ ! -d $POLIPODIR ]; then
23 if [ ! -d $LOGDIR ]; then
26 # Check its permissions.
27 chown
$POLIPOUSER $POLIPODIR
28 chgrp daemon
$POLIPODIR
30 chown
$POLIPOUSER $LOGDIR
34 # Create the configuration file only if there wasn't one already.
35 if [ ! -f $TARGET/config
]; then
36 cp $TARGET/config.osx
$TARGET/config
39 cd /usr
/share
/man
/man1
40 MAN1
=$TARGET/share
/man
/man1
42 if [ -d /Library
/StartupItems
/Polipo
]; then
43 find /Library
/StartupItems
/Polipo
-print0 |
xargs -0 chown root
:wheel
47 if [ -f $PACKAGE_PATH/Contents
/Resources
/uninstall_polipo_bundle.sh
]; then
48 cp $PACKAGE_PATH/Contents
/Resources
/uninstall_polipo_bundle.sh
$TARGET/uninstall_polipo_bundle.sh
49 chmod 755 $TARGET/uninstall_polipo_bundle.sh