Use onion xmpp server for profanity

This commit is contained in:
Bob Mottram 2017-02-09 16:10:58 +00:00
parent 03c1fee44a
commit 4c8a862488
1 changed files with 3 additions and 0 deletions

View File

@ -194,9 +194,11 @@ function add_user_xmpp {
if [ ! -d /home/$new_username/.config/profanity ]; then
mkdir -p /home/$new_username/.config/profanity
fi
XMPP_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_xmpp/hostname)
echo "[${new_username}@${HOSTNAME}]" > $XMPP_CLIENT_ACCOUNTS
echo 'enabled=true' >> $XMPP_CLIENT_ACCOUNTS
echo "jid=${new_username}@${HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
echo "server=$XMPP_ONION_HOSTNAME" >> $XMPP_CLIENT_ACCOUNTS
echo 'resource=profanity' >> $XMPP_CLIENT_ACCOUNTS
echo "muc.service=conference.${HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
echo "muc.nick=${new_username}" >> $XMPP_CLIENT_ACCOUNTS
@ -1019,6 +1021,7 @@ function install_xmpp_client {
echo 'enabled=true' >> $XMPP_CLIENT_ACCOUNTS
fi
echo "jid=${MY_USERNAME}@${XMPP_ONION_HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
echo "server=$XMPP_ONION_HOSTNAME" >> $XMPP_CLIENT_ACCOUNTS
echo 'resource=profanity' >> $XMPP_CLIENT_ACCOUNTS
echo "muc.service=${XMPP_ONION_HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
echo "muc.nick=${MY_USERNAME}" >> $XMPP_CLIENT_ACCOUNTS