#!/bin/sh # File : privoxy-create.sh # # Purpose : Identify the OS X version and call the appropriate # script to generate the privoxy group and user # # 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 OSXPackageBuilder # module. # # # 'sudo' check # uid="`/usr/bin/id -u`" if [ ${uid} -ne 0 ]; then echo "Error: insufficient privileges." echo "This script must be executed with the 'sudo' command." echo "Review the README file for instructions on creating a privoxy group and user." exit 1 fi # # load common settings # . ./common.sh # # create a privoxy group and user # if [ ! -z ${SCRIPT} ]; then /bin/sh ./${SCRIPT} else echo "Error: a privoxy group and user cannot be created." echo "This release of Mac OS X is not supported." fi