3 # File : startPrivoxy.sh
5 # Purpose : Uses the method appropriate to the host OS X version
8 # Copyright : Written by and Copyright (C) 2001-2012 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 macsetup module.
34 root_UID=0 # Root has $UID 0.
36 if [ "$UID" -eq "$root_UID" ]; then
37 # what is the kernel version
38 darwin_major_rel_num="`/usr/bin/uname -r | /usr/bin/sed 's/\..*//'`"
39 case "${darwin_major_rel_num}" in
40 # Mac OS X 10.7, 10.6, 10.5
42 /bin/launchctl load /Library/LaunchDaemons/org.ijbswa.privoxy.plist
46 /Library/StartupItems/Privoxy/Privoxy start
54 echo This script requires administrator privileges.
55 echo "Please run it from Terminal, using an administrator account, as follows:"
57 echo "sudo /Applications/Privoxy/startPrivoxy.sh"