mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
Adding Tor module (#21)
This commit is contained in:
committed by
Sebastian Kinne
parent
59e27d303e
commit
c704837917
29
tor/scripts/dependencies.sh
Executable file
29
tor/scripts/dependencies.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
# author: catatonicprime
|
||||
# date: March 2018
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sd/lib:/sd/usr/lib
|
||||
export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
|
||||
|
||||
touch /tmp/tor.progress
|
||||
|
||||
if [ "$1" = "install" ]; then
|
||||
opkg update
|
||||
if [ "$2" = "internal" ]; then
|
||||
opkg install tor-geoip tor
|
||||
elif [ "$2" = "sd" ]; then
|
||||
opkg install tor-geoip tor --dest sd
|
||||
fi
|
||||
mkdir -p /etc/config/tor/
|
||||
cp /pineapple/modules/tor/files/torrc /etc/config/tor
|
||||
mkdir -p /etc/config/tor/services
|
||||
chown tor:tor /etc/config/tor/services
|
||||
chown root:tor /etc/tor/torrc
|
||||
chmod g+r /etc/tor/torrc
|
||||
elif [ "$1" = "remove" ]; then
|
||||
opkg remove tor-geoip tor
|
||||
sed -i '/tor\/scripts\/autostart_tor.sh/d' /etc/rc.local
|
||||
rm -rf /etc/config/tor
|
||||
fi
|
||||
|
||||
rm /tmp/tor.progress
|
||||
Reference in New Issue
Block a user