mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
tor: New package.
This commit is contained in:
1
config/backup/includes/tor
Normal file
1
config/backup/includes/tor
Normal file
@@ -0,0 +1 @@
|
||||
/etc/tor
|
||||
@@ -126,6 +126,7 @@ etc/rc.d/init.d/teamspeak
|
||||
etc/rc.d/init.d/template
|
||||
#etc/rc.d/init.d/tftpd
|
||||
etc/rc.d/init.d/tmpfs
|
||||
#etc/rc.d/init.d/tor
|
||||
etc/rc.d/init.d/udev
|
||||
etc/rc.d/init.d/udev_retry
|
||||
etc/rc.d/init.d/upnpd
|
||||
|
||||
@@ -128,6 +128,7 @@ etc/rc.d/init.d/teamspeak
|
||||
etc/rc.d/init.d/template
|
||||
#etc/rc.d/init.d/tftpd
|
||||
etc/rc.d/init.d/tmpfs
|
||||
#etc/rc.d/init.d/tor
|
||||
#etc/rc.d/init.d/transmission
|
||||
etc/rc.d/init.d/udev
|
||||
etc/rc.d/init.d/udev_retry
|
||||
|
||||
25
config/rootfiles/packages/tor
Normal file
25
config/rootfiles/packages/tor
Normal file
@@ -0,0 +1,25 @@
|
||||
#etc/logrotate.d
|
||||
etc/logrotate.d/tor
|
||||
etc/rc.d/init.d/tor
|
||||
#etc/tor
|
||||
etc/tor/tor-tsocks.conf
|
||||
etc/tor/torrc
|
||||
usr/bin/tor
|
||||
usr/bin/tor-gencert
|
||||
usr/bin/tor-resolve
|
||||
usr/bin/torify
|
||||
#usr/share/doc/tor
|
||||
#usr/share/doc/tor/tor-gencert.html
|
||||
#usr/share/doc/tor/tor-resolve.html
|
||||
#usr/share/doc/tor/tor.html
|
||||
#usr/share/doc/tor/torify.html
|
||||
#usr/share/man/man1/tor-gencert.1
|
||||
#usr/share/man/man1/tor-resolve.1
|
||||
#usr/share/man/man1/tor.1
|
||||
#usr/share/man/man1/torify.1
|
||||
usr/share/tor
|
||||
usr/share/tor/defaults-torrc
|
||||
usr/share/tor/geoip
|
||||
var/ipfire/backup/addons/includes/tor
|
||||
var/lib/tor
|
||||
var/log/tor
|
||||
3
config/tor/defaults-torrc
Normal file
3
config/tor/defaults-torrc
Normal file
@@ -0,0 +1,3 @@
|
||||
DataDirectory /var/lib/tor
|
||||
User nobody
|
||||
Log notice syslog
|
||||
13
config/tor/tor.logrotate
Normal file
13
config/tor/tor.logrotate
Normal file
@@ -0,0 +1,13 @@
|
||||
/var/log/tor/*.log {
|
||||
daily
|
||||
rotate 5
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 0640 nobody nobody
|
||||
sharedscripts
|
||||
postrotate
|
||||
/etc/init.d/tor reload >/dev/null 2>&1 || :
|
||||
endscript
|
||||
}
|
||||
110
lfs/tor
Normal file
110
lfs/tor
Normal file
@@ -0,0 +1,110 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# 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 3 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. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 0.2.3.25
|
||||
|
||||
THISAPP = tor-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
PROG = tor
|
||||
PAK_VER = 1
|
||||
|
||||
DEPS = "libevent2"
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = a1c364189a9a66ed9daa8e6436489daf
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
dist:
|
||||
@$(PAK)
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--with-tor-user=nobody \
|
||||
--with-tor-group=nobody
|
||||
|
||||
cd $(DIR_APP) && make $(MAKETUNING)
|
||||
cd $(DIR_APP) && make install
|
||||
|
||||
# Install configuration file.
|
||||
mv /etc/tor/torrc{.sample,}
|
||||
|
||||
mkdir -pv /var/lib/tor /var/log/tor
|
||||
chown nobody:nobody /var/lib/tor
|
||||
|
||||
# Logrotate
|
||||
mkdir -pv /etc/logrotate.d
|
||||
install -v -m 644 $(DIR_SRC)/config/tor/tor.logrotate \
|
||||
/etc/logrotate.d/tor
|
||||
|
||||
# Defaults
|
||||
mkdir -pv /usr/share/tor
|
||||
install -v -m 644 $(DIR_SRC)/config/tor/defaults-torrc \
|
||||
/usr/share/tor/defaults-torrc
|
||||
|
||||
install -v -m 644 $(DIR_SRC)/config/backup/includes/tor \
|
||||
/var/ipfire/backup/addons/includes/tor
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
1
make.sh
1
make.sh
@@ -779,6 +779,7 @@ buildipfire() {
|
||||
ipfiremake perl-File-Tail
|
||||
ipfiremake perl-TimeDate
|
||||
ipfiremake swatch
|
||||
ipfiremake tor
|
||||
echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild
|
||||
cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild
|
||||
echo >> $BASEDIR/build/var/ipfire/firebuild
|
||||
|
||||
48
src/initscripts/init.d/tor
Normal file
48
src/initscripts/init.d/tor
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin $rc_base/init.d/tor
|
||||
#
|
||||
# Description : Anonymizing overlay network for TCP
|
||||
#
|
||||
########################################################################
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. ${rc_functions}
|
||||
|
||||
case "${1}" in
|
||||
start)
|
||||
boot_mesg "Starting tor..."
|
||||
loadproc /usr/bin/tor \
|
||||
--runasdaemon 1 \
|
||||
--defaults-torrc /usr/share/tor/defaults-torrc \
|
||||
-f /etc/tor/torrc \
|
||||
--quiet
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping tor..."
|
||||
killproc /usr/bin/tor
|
||||
;;
|
||||
|
||||
reload)
|
||||
boot_mesg "Reloading tor..."
|
||||
reloadproc /usr/bin/tor
|
||||
;;
|
||||
|
||||
restart)
|
||||
${0} stop
|
||||
sleep 1
|
||||
${0} start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/bin/tor
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: ${0} {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/tor
|
||||
Reference in New Issue
Block a user