Verified Commit 2bea0d3b authored by BTCxZelko's avatar BTCxZelko
Browse files

Add bug fixes with updates 5-8.

add tor.service fix during initial install.
parents 9598b41c b7566a68
......@@ -25,6 +25,9 @@ _main() {
_update_03 # Add password less reboot/shutdown privileges
_update_04 # Add password less for /usr/bin/{ufw,mount,umount,cat,grep,test,mkswap,swapon,swapoff} privileges
_update_05 # Fix tor unit file
_update_06 # Modify pacman to Ignore specific packages
_update_07 # Set user.conf in appropriate place
_update_08 # Store ip address range in ~/.config/RoninDojo/ip.txt
# Create symbolic link for main ronin script
if [ ! -h /usr/local/bin/ronin ]; then
......@@ -333,6 +336,13 @@ TOR_DIR
sudo chown -R tor:tor "${INSTALL_DIR_TOR}"
fi
if ! systemctl is-active --quiet tor; then
sudo sed -i 's:^ReadWriteDirectories=-/var/lib/tor.*$:ReadWriteDirectories=-/var/lib/tor /mnt/usb/tor/:' /usr/lib/systemd/system/tor.service
#sudo sed -i '/Type=notify/i\User=tor' /usr/lib/systemd/system/tor.service
sudo systemctl daemon-reload
sudo systemctl restart tor
fi
cat <<TOR_CONFIG
${RED}
***
......
......@@ -72,8 +72,26 @@ EOF"
# fix tor unit file
_update_05() {
if ! systemctl is-active --quiet tor; then
sudo sed -i 's:ReadWriteDirectories=-/var/lib/tor:ReadWriteDirectories=-/var/lib/tor /mnt/usb/tor:' /usr/lib/systemd/system/tor.service
sudo sed -i 's:^ReadWriteDirectories=-/var/lib/tor.*$:ReadWriteDirectories=-/var/lib/tor /mnt/usb/tor/:' /usr/lib/systemd/system/tor.service
#sudo sed -i '/Type=notify/i\User=tor' /usr/lib/systemd/system/tor.service
sudo systemctl daemon-reload
sudo systemctl restart tor
fi
}
\ No newline at end of file
}
# modify pacman.conf
_update_06() {
sudo sed -i "s:^#IgnorePkg =.*$:IgnorePkg = tor docker docker-compose bridge-utils:" /etc/pacman.conf
}
# copy user.conf.example to correct location
_update_07() {
if [ ! -f "$HOME"/.config/RoninDojo/user.conf ] ; then
cp -rv "$HOME"/RoninDojo/user.conf.example "$HOME"/.config/RoninDojo/user.conf
fi
}
# store ip address range in ~/.config/RoninDojo/ip.txt
_update_08() {
ip addr | sed -rn '/state UP/{n;n;s:^ *[^ ]* *([^ ]*).*:\1:;s:[^.]*$:0/24:p}' > "$HOME"/.config/RoninDojo/ip.txt
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment