mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-12 22:23:49 +01:00
The whole process works from preflight to postflight creating a clean
Tor install with proper config file edits svn:r6914
This commit is contained in:
parent
cd45eb6175
commit
8ae177dad6
@ -7,4 +7,4 @@ EXTRA_DIST = PrivoxyConfDesc.plist PrivoxyConfInfo.plist \
|
|||||||
package.sh privoxy.config TorPostflight addsysuser \
|
package.sh privoxy.config TorPostflight addsysuser \
|
||||||
Tor_Uninstaller.applescript uninstall_tor_bundle.sh \
|
Tor_Uninstaller.applescript uninstall_tor_bundle.sh \
|
||||||
package_list.txt tor_logo.gif Tor_Uninstaller.app.tar.gz \
|
package_list.txt tor_logo.gif Tor_Uninstaller.app.tar.gz \
|
||||||
net.freehaven.tor.plist.in
|
net.freehaven.tor.plist.in TorPreFlight
|
||||||
|
@ -116,10 +116,9 @@ fi
|
|||||||
|
|
||||||
# If the pre-install script did it's thing, it should have saved the
|
# If the pre-install script did it's thing, it should have saved the
|
||||||
# config and server keys; put these back and clean up
|
# config and server keys; put these back and clean up
|
||||||
if [ -f ~/TorSavedMe ]; then
|
if [ -f /tmp/TorSavedMe.tar.gz ]; then
|
||||||
TARBALL=`cat ~/TorSavedMe`
|
tar zxf /tmp/TorSavedMe.tar.gz -C /
|
||||||
tar zxf $TARBALL -C /
|
rm /tmp/TorSavedMe.tar.gz
|
||||||
rm ~/TorSavedMe ~/$TARBALL
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine how to start by OS Version
|
# Determine how to start by OS Version
|
||||||
@ -127,8 +126,6 @@ if [ $OS = "tiger" ]; then
|
|||||||
if [ -f $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist ]; then
|
if [ -f $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist ]; then
|
||||||
cp $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist /System/Library/LaunchDaemons/net.freehaven.tor.plist
|
cp $PACKAGE_PATH/Contents/Resources/net.freehaven.tor.plist /System/Library/LaunchDaemons/net.freehaven.tor.plist
|
||||||
chmod 644 /System/Library/LaunchDaemons/net.freehaven.tor.plist
|
chmod 644 /System/Library/LaunchDaemons/net.freehaven.tor.plist
|
||||||
grep -q "#--START" $TARGET/torrc
|
|
||||||
if [ "$?" -ne "0" ]; then
|
|
||||||
echo "#--START required settings--" >> $TARGET/torrc
|
echo "#--START required settings--" >> $TARGET/torrc
|
||||||
echo "RunAsDaemon 0" >> $TARGET/torrc
|
echo "RunAsDaemon 0" >> $TARGET/torrc
|
||||||
echo "Log notice file $TARGET/var/log/tor/tor.log" >> $TARGET/torrc
|
echo "Log notice file $TARGET/var/log/tor/tor.log" >> $TARGET/torrc
|
||||||
|
@ -13,14 +13,12 @@ echo $TORPATH
|
|||||||
|
|
||||||
# Backup all of Tor, just in case
|
# Backup all of Tor, just in case
|
||||||
if [ -d $TORPATH ]; then
|
if [ -d $TORPATH ]; then
|
||||||
tar zcf ~/`date "+%Y-%m-%d"`-Tor.backup.tar.gz $TORPATH/var/lib/tor/ $TORPATH/torrc
|
tar zcf /tmp/TorSavedMe.tar.gz $TORPATH/var/lib/tor $TORPATH/torrc
|
||||||
echo `date "+%Y-%m-%d"`-Tor.backup.tar.gz > ~/TorSavedMe
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove Tor and everything to do with it
|
# Remove Tor and everything to do with it
|
||||||
if [ -f $TORPATH/uninstall_tor_bundle.sh ]; then
|
if [ -f $TORPATH/uninstall_tor_bundle.sh ]; then
|
||||||
$TORPATH/uninstall_tor_bundle.sh
|
$TORPATH/uninstall_tor_bundle.sh
|
||||||
echo "You made it to the uninstaller"
|
|
||||||
else
|
else
|
||||||
$PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh
|
$PACKAGE_PATH/Contents/Resources/uninstall_tor_bundle.sh
|
||||||
fi
|
fi
|
||||||
|
@ -83,6 +83,7 @@ cp contrib/osx/ReadMe.rtf $BUILD_DIR/tor_resources
|
|||||||
#cp contrib/osx/License.rtf $BUILD_DIR/tor_resources
|
#cp contrib/osx/License.rtf $BUILD_DIR/tor_resources
|
||||||
chmod 755 contrib/osx/TorPostflight
|
chmod 755 contrib/osx/TorPostflight
|
||||||
cp contrib/osx/TorPostflight $BUILD_DIR/tor_resources/postflight
|
cp contrib/osx/TorPostflight $BUILD_DIR/tor_resources/postflight
|
||||||
|
cp contrib/osx/TorPreFlight $BUILD_DIR/tor_resources/preflight
|
||||||
cp contrib/osx/addsysuser $BUILD_DIR/tor_resources/addsysuser
|
cp contrib/osx/addsysuser $BUILD_DIR/tor_resources/addsysuser
|
||||||
cp contrib/osx/Tor_Uninstaller.applescript $BUILD_DIR/tor_resources/Tor_Uninstaller.applescript
|
cp contrib/osx/Tor_Uninstaller.applescript $BUILD_DIR/tor_resources/Tor_Uninstaller.applescript
|
||||||
cp contrib/osx/Tor_Uninstaller.app.tar.gz $BUILD_DIR/tor_resources/Tor_Uninstaller.app.tar.gz
|
cp contrib/osx/Tor_Uninstaller.app.tar.gz $BUILD_DIR/tor_resources/Tor_Uninstaller.app.tar.gz
|
||||||
@ -138,11 +139,7 @@ $PACKAGEMAKER -build \
|
|||||||
-d contrib/osx/PrivoxyConfDesc.plist
|
-d contrib/osx/PrivoxyConfDesc.plist
|
||||||
|
|
||||||
### Make Startup Script package
|
### Make Startup Script package
|
||||||
# If Tiger or later, use launchd. Otherwise, use StartupItems
|
|
||||||
|
|
||||||
if [ $OS = "tiger" ]; then
|
|
||||||
cp contrib/osx/net.freehaven.tor.plist $BUILD_DIR/tor_resources/net.freehaven.tor.plist
|
|
||||||
else
|
|
||||||
mkdir -p $BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
|
mkdir -p $BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
|
||||||
cp contrib/osx/Tor contrib/osx/StartupParameters.plist \
|
cp contrib/osx/Tor contrib/osx/StartupParameters.plist \
|
||||||
$BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
|
$BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor
|
||||||
@ -153,7 +150,6 @@ else
|
|||||||
-f $BUILD_DIR/torstartup_packageroot \
|
-f $BUILD_DIR/torstartup_packageroot \
|
||||||
-i contrib/osx/TorStartupInfo.plist \
|
-i contrib/osx/TorStartupInfo.plist \
|
||||||
-d contrib/osx/TorStartupDesc.plist
|
-d contrib/osx/TorStartupDesc.plist
|
||||||
fi
|
|
||||||
|
|
||||||
### Assemble the metapackage. Packagemaker won't buld metapackages from
|
### Assemble the metapackage. Packagemaker won't buld metapackages from
|
||||||
# the command line, so we need to do it by hand.
|
# the command line, so we need to do it by hand.
|
||||||
|
Loading…
Reference in New Issue
Block a user