Add tox node public key to the readme
This commit is contained in:
parent
26216a1c28
commit
8c56ae7717
|
@ -7605,8 +7605,28 @@ function install_tox_node {
|
||||||
systemctl status tox-bootstrapd.service
|
systemctl status tox-bootstrapd.service
|
||||||
exit 5846
|
exit 5846
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
systemctl restart tox-bootstrapd.service
|
||||||
|
TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}')
|
||||||
|
if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then
|
||||||
|
echo 'Could not obtain the tox node public key'
|
||||||
|
exit 6529
|
||||||
|
fi
|
||||||
|
|
||||||
configure_firewall_for_tox
|
configure_firewall_for_tox
|
||||||
|
|
||||||
|
if ! grep -q "Tox node" /home/$MY_USERNAME/README; then
|
||||||
|
XMPP_PASSWORD="$(openssl rand -base64 8)"
|
||||||
|
prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME $XMPP_PASSWORD
|
||||||
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
|
echo 'Tox' >> /home/$MY_USERNAME/README
|
||||||
|
echo '===' >> /home/$MY_USERNAME/README
|
||||||
|
echo "Your Tox node public key is: $TOX_PUBLIC_KEY" >> /home/$MY_USERNAME/README
|
||||||
|
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
|
||||||
|
chmod 600 /home/$MY_USERNAME/README
|
||||||
|
fi
|
||||||
|
|
||||||
echo 'install_tox_node' >> $COMPLETION_FILE
|
echo 'install_tox_node' >> $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue