Tox onion domain
This commit is contained in:
parent
14fc909334
commit
9f14fbeb60
|
@ -6866,7 +6866,16 @@ function install_tox_node {
|
||||||
exit 5846
|
exit 5846
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
TOX_ONION_HOSTNAME=$(add_onion_service tox ${TOX_PORT} ${TOX_PORT})
|
||||||
|
|
||||||
|
if ! grep -q "tox onion domain" $COMPLETION_FILE; then
|
||||||
|
echo "tox onion domain:${TOX_ONION_HOSTNAME}" >> $COMPLETION_FILE
|
||||||
|
else
|
||||||
|
sed -i "s|tox onion domain.*|tox onion domain:${TOX_ONION_HOSTNAME}|g" $COMPLETION_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
systemctl restart tox-bootstrapd.service
|
systemctl restart tox-bootstrapd.service
|
||||||
|
|
||||||
TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1)
|
TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1)
|
||||||
if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then
|
if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then
|
||||||
echo $'Could not obtain the tox node public key'
|
echo $'Could not obtain the tox node public key'
|
||||||
|
@ -6883,6 +6892,7 @@ function install_tox_node {
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo 'Tox' >> /home/$MY_USERNAME/README
|
echo 'Tox' >> /home/$MY_USERNAME/README
|
||||||
echo '===' >> /home/$MY_USERNAME/README
|
echo '===' >> /home/$MY_USERNAME/README
|
||||||
|
echo $"tox onion domain: ${TOX_ONION_HOSTNAME}" >> /home/$MY_USERNAME/README
|
||||||
echo $"Your Tox node public key is: $TOX_PUBLIC_KEY" >> /home/$MY_USERNAME/README
|
echo $"Your Tox node public key is: $TOX_PUBLIC_KEY" >> /home/$MY_USERNAME/README
|
||||||
echo $'In the Toxic client you can connect to it with:' >> /home/$MY_USERNAME/README
|
echo $'In the Toxic client you can connect to it with:' >> /home/$MY_USERNAME/README
|
||||||
echo " /connect $DEFAULT_DOMAIN_NAME.local $TOX_PORT $TOX_PUBLIC_KEY" >> /home/$MY_USERNAME/README
|
echo " /connect $DEFAULT_DOMAIN_NAME.local $TOX_PORT $TOX_PUBLIC_KEY" >> /home/$MY_USERNAME/README
|
||||||
|
|
|
@ -163,6 +163,11 @@ function show_domains {
|
||||||
echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
|
echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
|
||||||
echo "$(cat ${COMPLETION_FILE} | grep 'IRC onion domain' | awk -F ':' '{print $2}')"
|
echo "$(cat ${COMPLETION_FILE} | grep 'IRC onion domain' | awk -F ':' '{print $2}')"
|
||||||
fi
|
fi
|
||||||
|
if grep -q "tox onion domain" $COMPLETION_FILE; then
|
||||||
|
echo -n -e "$(pad_string 'Tox')"
|
||||||
|
echo -n -e "$(pad_string ${DEFAULT_DOMAIN_NAME})"
|
||||||
|
echo "$(cat ${COMPLETION_FILE} | grep 'tox onion domain' | awk -F ':' '{print $2}')"
|
||||||
|
fi
|
||||||
if grep -q "Wiki domain" $COMPLETION_FILE; then
|
if grep -q "Wiki domain" $COMPLETION_FILE; then
|
||||||
echo -n -e "$(pad_string 'Wiki')"
|
echo -n -e "$(pad_string 'Wiki')"
|
||||||
WIKIDOM=$(cat ${COMPLETION_FILE} | grep 'Wiki domain' | awk -F ':' '{print $2}')
|
WIKIDOM=$(cat ${COMPLETION_FILE} | grep 'Wiki domain' | awk -F ':' '{print $2}')
|
||||||
|
|
Loading…
Reference in New Issue