xmpp commandline client
This commit is contained in:
parent
5b2f3bffd4
commit
5506fceb36
|
@ -7420,6 +7420,70 @@ function install_xmpp {
|
|||
echo 'install_xmpp' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function install_xmpp_client {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fxq "install_xmpp_client" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
apt-get -y install profanity
|
||||
|
||||
XMPP_CLIENT_DIR=/home/$MY_USERNAME/.local/share/profanity
|
||||
XMPP_CLIENT_ACCOUNTS=$XMPP_CLIENT_DIR/accounts
|
||||
if [ ! -d $XMPP_CLIENT_DIR ]; then
|
||||
mkdir -p $XMPP_CLIENT_DIR
|
||||
fi
|
||||
|
||||
if [[ $ONION_ONLY == 'no' ]]; then
|
||||
echo "[${MY_USERNAME}@${DEFAULT_DOMAIN_NAME}]" > $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'enabled=true' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo "jid=${MY_USERNAME}@${DEFAULT_DOMAIN_NAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'resource=profanity' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo "muc.service=conference.${DEFAULT_DOMAIN_NAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo "muc.nick=${MY_USERNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'presence.last=online' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'presence.login=online' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.online=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.chat=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.away=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.xa=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.dnd=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
fi
|
||||
|
||||
if [ -f /var/lib/tor/hidden_service_xmpp/hostname ]; then
|
||||
XMPP_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_xmpp/hostname)
|
||||
echo "[${MY_USERNAME}@${XMPP_ONION_HOSTNAME}]" >> $XMPP_CLIENT_ACCOUNTS
|
||||
if [[ $ONION_ONLY == 'no' ]]; then
|
||||
echo 'enabled=false' >> $XMPP_CLIENT_ACCOUNTS
|
||||
else
|
||||
echo 'enabled=true' >> $XMPP_CLIENT_ACCOUNTS
|
||||
fi
|
||||
echo "jid=${MY_USERNAME}@${XMPP_ONION_HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'resource=profanity' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo "muc.service=conference.${XMPP_ONION_HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo "muc.nick=${MY_USERNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'presence.last=online' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'presence.login=online' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.online=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.chat=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.away=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.xa=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.dnd=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
fi
|
||||
|
||||
if [ ! -d /home/$MY_USERNAME/.config/profanity ]; then
|
||||
mkdir /home/$MY_USERNAME/.config/profanity
|
||||
fi
|
||||
echo '[connection]' > /home/$MY_USERNAME/.config/profanity/profrc
|
||||
echo "account=${MY_USERNAME}@${DEFAULT_DOMAIN_NAME}" >> /home/$MY_USERNAME/.config/profanity/profrc
|
||||
|
||||
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.local
|
||||
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.config
|
||||
|
||||
echo 'install_xmpp_client' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function install_watchdog_script {
|
||||
if grep -Fxq "install_watchdog_script" $COMPLETION_FILE; then
|
||||
return
|
||||
|
@ -10323,6 +10387,7 @@ configure_owncloud_onion_site
|
|||
upgrade_golang
|
||||
install_gogs
|
||||
install_xmpp
|
||||
install_xmpp_client
|
||||
install_tox_node
|
||||
install_tox_client
|
||||
tox_avahi
|
||||
|
|
|
@ -193,6 +193,37 @@ if grep -q "install_xmpp" $COMPLETION_FILE; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if grep -q "install_xmpp_client" $COMPLETION_FILE; then
|
||||
echo $"Adding XMPP client setup"
|
||||
XMPP_CLIENT_DIR=/home/$MY_USERNAME/.local/share/profanity
|
||||
XMPP_CLIENT_ACCOUNTS=$XMPP_CLIENT_DIR/accounts
|
||||
if [ ! -d $XMPP_CLIENT_DIR ]; then
|
||||
mkdir -p $XMPP_CLIENT_DIR
|
||||
fi
|
||||
if [ ! -d /home/$MY_USERNAME/.config/profanity ]; then
|
||||
mkdir /home/$MY_USERNAME/.config/profanity
|
||||
fi
|
||||
echo "[${MY_USERNAME}@${HOSTNAME}]" > $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'enabled=true' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo "jid=${MY_USERNAME}@${HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'resource=profanity' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo "muc.service=conference.${HOSTNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo "muc.nick=${MY_USERNAME}" >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'presence.last=online' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'presence.login=online' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.online=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.chat=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.away=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.xa=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
echo 'priority.dnd=0' >> $XMPP_CLIENT_ACCOUNTS
|
||||
|
||||
echo '[connection]' > /home/$MY_USERNAME/.config/profanity/profrc
|
||||
echo "account=${MY_USERNAME}@${HOSTNAME}" >> /home/$MY_USERNAME/.config/profanity/profrc
|
||||
|
||||
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.local
|
||||
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.config
|
||||
fi
|
||||
|
||||
if grep -q "Blog domain" $COMPLETION_FILE; then
|
||||
FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Blog domain" | awk -F ':' '{print $2}')
|
||||
if [ ! -d /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/config/users ]; then
|
||||
|
|
|
@ -547,14 +547,15 @@ function menu_top_level {
|
|||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle $"Freedombone User Control Panel" \
|
||||
--title $"User Control Panel" \
|
||||
--radiolist $"Choose an operation:" 14 50 7 \
|
||||
--radiolist $"Choose an operation:" 15 50 8 \
|
||||
1 $"Use Email" off \
|
||||
2 $"Change Email Filtering Rules" off \
|
||||
3 $"Use Chat" off \
|
||||
4 $"Use IRC" off \
|
||||
5 $"Your Encryption Keys" off \
|
||||
6 $"Exit to the command line" off \
|
||||
7 $"Log out" on 2> $data
|
||||
3 $"Use Tox Chat" off \
|
||||
4 $"Use XMPP Chat" off \
|
||||
5 $"Use IRC" off \
|
||||
6 $"Your Encryption Keys" off \
|
||||
7 $"Exit to the command line" off \
|
||||
8 $"Log out" on 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 1;;
|
||||
|
@ -564,10 +565,11 @@ function menu_top_level {
|
|||
1) mutt;;
|
||||
2) menu_email;;
|
||||
3) toxic;;
|
||||
4) irssi;;
|
||||
5) menu_encryption_keys;;
|
||||
6) break;;
|
||||
7) kill -HUP `pgrep -s 0 -o`;;
|
||||
4) profanity;;
|
||||
5) irssi;;
|
||||
6) menu_encryption_keys;;
|
||||
7) break;;
|
||||
8) kill -HUP `pgrep -s 0 -o`;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue