diff --git a/man/freedombone-client.1.gz b/man/freedombone-client.1.gz index a142f0f6..00a70a27 100644 Binary files a/man/freedombone-client.1.gz and b/man/freedombone-client.1.gz differ diff --git a/src/freedombone-client b/src/freedombone-client index 42c8e4dc..5501f58e 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -39,6 +39,9 @@ fi MESH_CLIENT_INSTALL= ENABLE_MONKEYSPHERE= +# setup for a specific app +SETUP_CLIENT_APP_NAME= + # Version number of this script VERSION="1.01" @@ -202,6 +205,61 @@ function show_help { exit 0 } +function setup_client_app_irc { + echo $'Setting up hexchat' + if [ ! -f /usr/bin/pacman ]; then + sudo apt-get -yq install tor hexchat tor + else + sudo pacman -S --noconfirm hexchat tor + fi + if [ ! -d /home/$CURR_USER/.config/hexchat ]; then + mkdir -p /home/$CURR_USER/.config/hexchat + fi + echo 'net_proxy_host = 127.0.0.1' > /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'net_proxy_port = 9050' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'net_proxy_type = 3' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'net_proxy_use = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + + echo 'net_proxy_auth = 1' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'net_proxy_pass = HexChat' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'net_proxy_user = HexChat' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + + echo 'dcc_auto_chat = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'dcc_auto_resume = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'dcc_auto_send = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'irc_hide_version = 1' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'identd = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + + echo 'away_reason =' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'irc_part_reason =' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo 'irc_quit_reason =' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + + echo "irc_real_name = ${USER}" >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo "irc_user_name = ${USER}" >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo "irc_nick1 = ${USER}" >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo "irc_nick2 = ${USER}_" >> /home/$CURR_USER/.config/hexchat/hexchat.conf + echo "irc_nick3 = ${USER}__" >> /home/$CURR_USER/.config/hexchat/hexchat.conf + + echo 'completion_suffix = :' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + + echo 'gui_slist_skip = 1' >> /home/$CURR_USER/.config/hexchat/hexchat.conf + + echo $'hexchat configured' +} + +function setup_client_app { + if [ ! $SETUP_CLIENT_APP_NAME ]; then + return + fi + + case $SETUP_CLIENT_APP_NAME in + hexchat|xchat|irc) + setup_client_app_irc + ;; + esac + exit 0 +} + while [[ $# > 1 ]] do key="$1" @@ -218,6 +276,10 @@ do shift WIFI_CHANNEL=${1} ;; + -s|--setup) + shift + SETUP_CLIENT_APP_NAME=${1} + ;; -m|--mesh) shift MESH_CLIENT_INSTALL=${1} @@ -234,6 +296,7 @@ do done echo $'Configuring client' +setup_client_app refresh_gpg_keys configure_ssh_client global_rate_limit