Obtain tox port for firewall
This commit is contained in:
parent
e479c43333
commit
2b586ff4a2
|
@ -201,6 +201,16 @@ function configure_firewall_for_tox {
|
|||
if [[ $ONION_ONLY != "no" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
TOX_PORT_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
|
||||
if [ ${#TOX_PORT_MAIN} -gt 2 ]; then
|
||||
TOX_PORT=$TOX_PORT_MAIN
|
||||
fi
|
||||
if [ ! $TOX_PORT ]; then
|
||||
echo $'No Tox port was specified'
|
||||
exit 32856
|
||||
fi
|
||||
|
||||
iptables -A INPUT -p tcp --dport $TOX_PORT -j ACCEPT
|
||||
function_check save_firewall_settings
|
||||
save_firewall_settings
|
||||
|
@ -331,15 +341,6 @@ function mesh_tox_node {
|
|||
exit 76325
|
||||
fi
|
||||
|
||||
TOX_PORT_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOX_PORT=" | head -n 1 | awk -F '=' '{print $2}')
|
||||
if [ ${#TOX_PORT_MAIN} -gt 2 ]; then
|
||||
TOX_PORT=$TOX_PORT_MAIN
|
||||
fi
|
||||
if [ ! $TOX_PORT ]; then
|
||||
echo $'No Tox port was specified'
|
||||
exit 32856
|
||||
fi
|
||||
|
||||
TOXCORE_REPO_MAIN=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}')
|
||||
if [ ${#TOXCORE_REPO_MAIN} -gt 10 ]; then
|
||||
TOXCORE_REPO=$TOXCORE_REPO_MAIN
|
||||
|
|
Loading…
Reference in New Issue