echo -e "Enabling and starting ${GREEN}${SERVICE}${RESET}"
sudo systemctl enable ${SERVICE}
sudo systemctl start ${SERVICE}
fi
}
}
check_ports() {
check_ports() {
install_if_needed nmap
install_if_needed nmap
nmap -Pn $domain > nmap.txt
nmap -Pn $domain > nmap.txt
OPEN=1
OPEN=1
if grep -qE "^80/.*(open|filtered)" nmap.txt; then
if grep -qE "^80/.*(open|filtered)" nmap.txt; then
echo -e "I can see port ${GREEN}80${RESET}!"
echo -e "I can see port ${GREEN}80${RESET}!"
else
else
echo -e "Uh oh, port ${RED}80${RESET} isn't showing up..."
echo -e "Uh oh, port ${RED}80${RESET} isn't showing up..."
OPEN=0
OPEN=0
fi
fi
if grep -qE "^443/.*(open|filtered)" nmap.txt; then
if grep -qE "^443/.*(open|filtered)" nmap.txt; then
echo -e "I can see port ${GREEN}443${RESET} as well!"
echo -e "I can see port ${GREEN}443${RESET} as well!"
else
else
echo -e "Uh oh, port ${RED}443${RESET} isn't showing up..."
echo -e "Uh oh, port ${RED}443${RESET} isn't showing up..."
OPEN=0
OPEN=0
fi
fi
rm nmap.txt
rm nmap.txt
echo ""
echo ""
if [[ $OPEN -eq 0 ]]; then
if [[ $OPEN -eq 0 ]]; then
echo -e "${RED}Port configuration needed.${RESET} Something (probably your wireless router) is blocking us from serving this page to the rest of the internet."
echo -e "${RED}Port configuration needed.${RESET} Something (probably your wireless router) is blocking us from serving this page to the rest of the internet."
echo "Port forwarding is relatively simple, but as it stands it is beyond the scope of this script to be able to automate it."
echo "Port forwarding is relatively simple, but as it stands it is beyond the scope of this script to be able to automate it."
echo -e "You'll probably need to look up the login information for your specific router and forward the red ports to the local IP of this computer (${BOLD}$(ip route | grep default | grep -oP "(?<=src )[^ ]+")${RESET})."
echo -e "You'll probably need to look up the login information for your specific router and forward the red ports to the local IP of this computer (${BOLD}$(ip route | grep default | grep -oP "(?<=src )[^ ]+")${RESET})."
echo -e "You can log into your router at this IP address: ${BOLD}$(route -n | grep ^0.0.0.0 | awk '{print $2}')${RESET}"
echo -e "You can log into your router at this IP address: ${BOLD}$(route -n | grep ^0.0.0.0 | awk '{print $2}')${RESET}"
echo "That's all the help I can give you regarding port forwarding. Good luck!"
echo "That's all the help I can give you regarding port forwarding. Good luck!"
echo -e "\n${BOLD}Alright, almost there!${RESET} Now we just need to set up the system daemons for Tor, Bitcoin, Lightning, and the AO so that everything opens on startup."
echo -e "\n${BOLD}Alright, almost there!${RESET} Now we just need to \
set up the system daemons for Tor, Bitcoin, Lightning, and the AO\
so that everything opens on startup."
while[[ -z $READY]];do
while[[ -z $READY]];do
echo -en "${BLUE}You ready? (y/n):${RESET}"
echo -en "${BLUE}You ready? (y/n):${RESET}"
read -n1 ao_select
read -n1 ao_select
@ -293,21 +297,7 @@ while [[ -z $READY ]]; do
esac
esac
done
done
echo""
build_service_from_template tor "TORRCPATH=$TORRCPATH""TORPATH=`which tor`"