diff options
Diffstat (limited to 'tor')
-rwxr-xr-x | tor/rc.tor.new | 20 | ||||
-rw-r--r-- | tor/slack-required | 1 | ||||
-rwxr-xr-x | tor/tor.SlackBuild | 22 |
3 files changed, 42 insertions, 1 deletions
diff --git a/tor/rc.tor.new b/tor/rc.tor.new new file mode 100755 index 00000000..f90b6d3e --- /dev/null +++ b/tor/rc.tor.new @@ -0,0 +1,20 @@ +#!/bin/sh +# +# init script for tor +# + +PID="/var/run" +PRIVOXY_PID="$PID/privoxy.pid" +TOR_PID="$PID/tor.pid" +USER="privoxy" + +if [ -f $TOR_PID ]; then + if ps `cat $TOR_PID` | grep -q tor; then + kill `cat $TOR_PID` + fi + rm $TOR_PID +fi + +sudo -u $USER /usr/bin/tor &> /dev/null & +echo "$!" > $TOR_PID + diff --git a/tor/slack-required b/tor/slack-required new file mode 100644 index 00000000..dd6fade5 --- /dev/null +++ b/tor/slack-required @@ -0,0 +1 @@ +libevent diff --git a/tor/tor.SlackBuild b/tor/tor.SlackBuild index e17078b8..4017448d 100755 --- a/tor/tor.SlackBuild +++ b/tor/tor.SlackBuild @@ -4,7 +4,17 @@ # by rhatto at riseup.net # -# TODO: signature checking +if [ -s "slack-required" ]; then + echo Recomended and required packages for building tor are: + cat slack-required | sed -e 's/^/\t/' + if [ "$INTERACT" != "no" ]; then + echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. + read crap + else + echo Sleeping 3 seconds... + sleep 3 + fi +fi CWD="`pwd`" @@ -47,8 +57,14 @@ fi if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then wget "$URL" -O "$SRC_DIR/$SRC" + wget "$URL.asc" -O "$SRC_DIR/$SRC.asc" fi +gpg --keyserver subkeys.pgp.net --recv-keys 0x28988BF5 +gpg --keyserver subkeys.pgp.net --recv-keys 0x165733EA +gpg --verify $SRC_DIR/$SRC.asc $SRC_DIR/$SRC || echo WARNING: Could not check signature or WRONG signature found. +sleep 3 + TMP="$TMP/$PACKAGE" rm -rf $TMP mkdir -p $TMP @@ -102,6 +118,10 @@ for file in AUTHORS ChangeLog INSTALL LICENSE README; do cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ done +# install script +echo '( chroot . /sbin/ldconfig )' > install/doinst.sh +echo '( if [ ! -f "etc/rc.d/rc.tor" ]; then mv etc/rc.d/rc.tor.new etc/rc.d/rc.tor ; fi )' >> install/doinst.sh + makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz if [ "$CLEANUP" == "yes" ]; then |