Issues with router_get_by_nickname() (3)
[tor/rransom.git] / contrib / osx / TorPreFlight
blob69dff3c1fd2c5c83aa68410c3196633a8bd096c0
1 #!/bin/sh
3 # ===================================================================
4 #
5 # TorPreFlight is distributed under this license:
7 # Copyright (c) 2006 Andrew Lewman
8 # Copyright (c) 2008 The Tor Project, Inc.
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted provided that the following conditions are
12 # met:
14 # * Redistributions of source code must retain the above copyright
15 # notice, this list of conditions and the following disclaimer.
17 # * Redistributions in binary form must reproduce the above
18 # copyright notice, this list of conditions and the following disclaimer
19 # in the documentation and/or other materials provided with the
20 # distribution.
22 # * Neither the names of the copyright owners nor the names of its
23 # contributors may be used to endorse or promote products derived from
24 # this software without specific prior written permission.
26 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 #===============================================================================
39 # TorPreFlight is invoked before the install begins
41 # Figure out where Tor is installed
42 if [ -f /Library/StartupItems/Tor/Tor.loc ]; then
43 TORPATH=`cat /Library/StartupItems/Tor/Tor.loc`
44 else
45 TORPATH="/Library/Tor/"
48 # Backup all of Tor, just in case
49 if [ -d $TORPATH ]; then
50 cp $TORPATH/torrc $TORPATH/torrc.installer-saved