+++ /dev/null
-#!/bin/sh
-
-# File : postinstall
-#
-# Purpose : execute all tasks necessary following installation of
-# Privoxy's files
-#
-# Copyright : Written by and Copyright (C) 2001-2013 the
-# Privoxy team. http://www.privoxy.org/
-#
-# This program is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU General Public
-# License for more details.
-#
-# The GNU General Public License should be included with
-# this file. If not, you can view it at
-# http://www.gnu.org/copyleft/gpl.html
-# or write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-# USA
-#
-# Modification : If you modify this file please consider whether your
-# changes ought to be passed back to the iOSPackageBuilder
-# module.
-#
-
-# This postinstall script:
-#
-# 1. Creates the logfile if not found and sets its ownership and persmissions
-# 2. Starts Privoxy
-
-# preinstall created this file; continue to append to it in this script
-logfile='/var/privoxy_installation.log'
-
-# 1. Create Privoxy's logfile if not found and set its ownership and persmissions
-#
-if [ ! -d /var/log/privoxy ]; then
- echo 'Creating Privoxy logfile directory' >> ${logfile}
- /bin/mkdir -m 0755 /var/log/privoxy >> ${logfile} 2>&1
-fi
-echo 'Creating Privoxy logfile and setting owner and permissions' >> ${logfile}
-/bin/touch /var/log/privoxy/logfile.log >> ${logfile} 2>&1
-/usr/sbin/chown root:wheel /var/log/privoxy/logfile.log >> ${logfile} 2>&1
-/bin/chmod 0644 /var/log/privoxy/logfile.log >> ${logfile} 2>&1
-
-# 2. Start Privoxy
-#
-echo 'Start Privoxy via the LaunchDaemon' >> ${logfile}
-/bin/launchctl load /Library/LaunchDaemons/org.ijbswa.privoxy.plist >> ${logfile} 2>&1
-
-exit 0
+++ /dev/null
-#!/bin/sh
-
-# File : preinstall
-#
-# Purpose : execute all tasks necessary prior to installation of
-# Privoxy's files
-#
-# Copyright : Written by and Copyright (C) 2001-2013 the
-# Privoxy team. http://www.privoxy.org/
-#
-# This program is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will
-# be useful, but WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU General Public
-# License for more details.
-#
-# The GNU General Public License should be included with
-# this file. If not, you can view it at
-# http://www.gnu.org/copyleft/gpl.html
-# or write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-# USA
-#
-# Modification : If you modify this file please consider whether your
-# changes ought to be passed back to the iOSPackageBuilder
-# module.
-#
-
-# This preinstall script:
-# 1. Shuts down Privoxy if it's running
-# 2. Backs up any existing log & configuration files
-
-# create installation log file
-logfile='/var/privoxy_installation.log'
-echo 'Privoxy installation on' `/bin/date` > ${logfile}
-
-# 1. Stop the Privoxy service if it's running
-#
-echo 'Stopping Privoxy via LaunchDaemon.' >> ${logfile}
-/bin/launchctl unload /Library/LaunchDaemons/org.ijbswa.privoxy.plist >> ${logfile} 2>&1
-
-# 2. Back up any existing log & configuration files
-#
-if [ -f /var/log/privoxy/logfile.log ]; then
- echo 'Backing up existing logfile' >> ${logfile}
- /bin/cp /var/log/privoxy/logfile.log /var/log/privoxy/logfile.old >> ${logfile} 2>&1
- /usr/sbin/chown privoxy:privoxy /var/log/privoxy/logfile.old >> ${logfile} 2>&1
-fi
-if [ -d /usr/local/etc/privoxy ]; then
- for i in config match-all.action trust user.action user.filter; do
- echo 'Backing up existing config file:' ${i} >> ${logfile}
- if [ -f /usr/local/etc/privoxy/$i ]; then
- /bin/cp /usr/local/etc/privoxy/$i /usr/local/etc/privoxy/$i.old >> ${logfile} 2>&1
- /usr/sbin/chown privoxy:privoxy /usr/local/etc/privoxy/$i.old >> ${logfile} 2>&1
- fi
- done
- echo 'Backing up existing config templates' >> ${logfile}
- /bin/cp -R /usr/local/etc/privoxy/templates /usr/local/etc/privoxy/templates.old >> ${logfile} 2>&1
- /usr/sbin/chown -R privoxy:privoxy /usr/local/etc/privoxy/templates.old >> ${logfile} 2>&1
-fi
-
-exit 0