5 # Purpose : execute all tasks necessary following installation of
8 # Copyright : Written by and Copyright (C) 2001-2013 the
9 # Privoxy team. http://www.privoxy.org/
11 # This program is free software; you can redistribute it
12 # and/or modify it under the terms of the GNU General
13 # Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at
15 # your option) any later version.
17 # This program is distributed in the hope that it will
18 # be useful, but WITHOUT ANY WARRANTY; without even the
19 # implied warranty of MERCHANTABILITY or FITNESS FOR A
20 # PARTICULAR PURPOSE. See the GNU General Public
21 # License for more details.
23 # The GNU General Public License should be included with
24 # this file. If not, you can view it at
25 # http://www.gnu.org/copyleft/gpl.html
26 # or write to the Free Software Foundation, Inc.,
27 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
30 # Modification : If you modify this file please consider whether your
31 # changes ought to be passed back to the iOSPackageBuilder
35 # This postinstall script:
37 # 1. Creates the logfile if not found and sets its ownership and persmissions
40 # preinstall created this file; continue to append to it in this script
41 logfile='/var/privoxy_installation.log'
43 # 1. Create Privoxy's logfile if not found and set its ownership and persmissions
45 if [ ! -d /var/log/privoxy ]; then
46 echo 'Creating Privoxy logfile directory' >> ${logfile}
47 /bin/mkdir -m 0755 /var/log/privoxy >> ${logfile} 2>&1
49 echo 'Creating Privoxy logfile and setting owner and permissions' >> ${logfile}
50 /bin/touch /var/log/privoxy/logfile.log >> ${logfile} 2>&1
51 /usr/sbin/chown root:wheel /var/log/privoxy/logfile.log >> ${logfile} 2>&1
52 /bin/chmod 0644 /var/log/privoxy/logfile.log >> ${logfile} 2>&1
56 echo 'Start Privoxy via the LaunchDaemon' >> ${logfile}
57 /bin/launchctl load /Library/LaunchDaemons/org.ijbswa.privoxy.plist >> ${logfile} 2>&1