#!/bin/sh # File : startPrivoxy.sh # # Purpose : Uses the method appropriate to the host OS X version # to start Privoxy # # Copyright : Written by and Copyright (C) 2001-2012 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 macsetup module. # root_UID=0 # Root has $UID 0. if [ "$UID" -eq "$root_UID" ]; then # what is the kernel version darwin_major_rel_num="`/usr/bin/uname -r | /usr/bin/sed 's/\..*//'`" case "${darwin_major_rel_num}" in # Mac OS X 10.5 or higher 9|1*) /bin/launchctl load /Library/LaunchDaemons/org.ijbswa.privoxy.plist ;; # Mac OS X 10.4, 10.3 8|7) /Library/StartupItems/Privoxy/Privoxy start ;; # default *) ;; esac else echo echo This script requires administrator privileges. echo "Please run it from Terminal, using an administrator account, as follows:" echo echo "sudo /Applications/Privoxy/startPrivoxy.sh" echo fi exit 0