diff --git a/Makefile b/Makefile index 42381cc9..6012874e 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ install: mv ${DESTDIR}${PREFIX}/bin/${APP}-app-* ${DESTDIR}/usr/share/${APP}/apps mv ${DESTDIR}${PREFIX}/bin/${APP}-utils-* ${DESTDIR}/usr/share/${APP}/utils mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1 + rm ${DESTDIR}${PREFIX}/share/man/man1/${APP}*.1.gz cp man/*.1.gz ${DESTDIR}${PREFIX}/share/man/man1 cp man/${APP}-backup-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/backup.1.gz cp man/${APP}-restore-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/restore.1.gz diff --git a/man/freedombone-addcert.1.gz b/man/freedombone-addcert.1.gz index cf5596b7..07885d9a 100644 Binary files a/man/freedombone-addcert.1.gz and b/man/freedombone-addcert.1.gz differ diff --git a/man/freedombone-addemail.1.gz b/man/freedombone-addemail.1.gz index d670da35..492710b8 100644 Binary files a/man/freedombone-addemail.1.gz and b/man/freedombone-addemail.1.gz differ diff --git a/man/freedombone-addlist.1.gz b/man/freedombone-addlist.1.gz index 4ebe6de3..2b3514bc 100644 Binary files a/man/freedombone-addlist.1.gz and b/man/freedombone-addlist.1.gz differ diff --git a/man/freedombone-addsipuser.1.gz b/man/freedombone-addsipuser.1.gz deleted file mode 100644 index c6df5edc..00000000 Binary files a/man/freedombone-addsipuser.1.gz and /dev/null differ diff --git a/man/freedombone-adduser.1.gz b/man/freedombone-adduser.1.gz index 66ba6999..8313b81d 100644 Binary files a/man/freedombone-adduser.1.gz and b/man/freedombone-adduser.1.gz differ diff --git a/man/freedombone-addxmpp.1.gz b/man/freedombone-addxmpp.1.gz deleted file mode 100644 index 746a83e5..00000000 Binary files a/man/freedombone-addxmpp.1.gz and /dev/null differ diff --git a/man/freedombone-archive-mail.1.gz b/man/freedombone-archive-mail.1.gz index e5e81c98..018bd00c 100644 Binary files a/man/freedombone-archive-mail.1.gz and b/man/freedombone-archive-mail.1.gz differ diff --git a/man/freedombone-backup-local.1.gz b/man/freedombone-backup-local.1.gz index 5ceb8ccd..6c9ff883 100644 Binary files a/man/freedombone-backup-local.1.gz and b/man/freedombone-backup-local.1.gz differ diff --git a/man/freedombone-backup-remote.1.gz b/man/freedombone-backup-remote.1.gz index 29ce3c4c..92d647b1 100644 Binary files a/man/freedombone-backup-remote.1.gz and b/man/freedombone-backup-remote.1.gz differ diff --git a/man/freedombone-blog.1.gz b/man/freedombone-blog.1.gz index cd9fd3f0..4a97d56e 100644 Binary files a/man/freedombone-blog.1.gz and b/man/freedombone-blog.1.gz differ diff --git a/man/freedombone-client.1.gz b/man/freedombone-client.1.gz index 401a425d..7d679d36 100644 Binary files a/man/freedombone-client.1.gz and b/man/freedombone-client.1.gz differ diff --git a/man/freedombone-clientcert.1.gz b/man/freedombone-clientcert.1.gz index 79b1b079..62337f3e 100644 Binary files a/man/freedombone-clientcert.1.gz and b/man/freedombone-clientcert.1.gz differ diff --git a/man/freedombone-config.1.gz b/man/freedombone-config.1.gz index 3ff2bba5..551a7180 100644 Binary files a/man/freedombone-config.1.gz and b/man/freedombone-config.1.gz differ diff --git a/man/freedombone-controlpanel-user.1.gz b/man/freedombone-controlpanel-user.1.gz index 24ab32fd..6a2a27dd 100644 Binary files a/man/freedombone-controlpanel-user.1.gz and b/man/freedombone-controlpanel-user.1.gz differ diff --git a/man/freedombone-controlpanel.1.gz b/man/freedombone-controlpanel.1.gz index a7be54e8..f851416a 100644 Binary files a/man/freedombone-controlpanel.1.gz and b/man/freedombone-controlpanel.1.gz differ diff --git a/man/freedombone-dhparam.1.gz b/man/freedombone-dhparam.1.gz index 18cb4bda..cbb27b96 100644 Binary files a/man/freedombone-dhparam.1.gz and b/man/freedombone-dhparam.1.gz differ diff --git a/man/freedombone-format.1.gz b/man/freedombone-format.1.gz index 9d761444..7ebf86dc 100644 Binary files a/man/freedombone-format.1.gz and b/man/freedombone-format.1.gz differ diff --git a/man/freedombone-ignore.1.gz b/man/freedombone-ignore.1.gz index a6c9d4d1..53eef589 100644 Binary files a/man/freedombone-ignore.1.gz and b/man/freedombone-ignore.1.gz differ diff --git a/man/freedombone-image.1.gz b/man/freedombone-image.1.gz index 27b5981e..ebaee074 100644 Binary files a/man/freedombone-image.1.gz and b/man/freedombone-image.1.gz differ diff --git a/man/freedombone-keydrive.1.gz b/man/freedombone-keydrive.1.gz index 1ac75038..92ec0d91 100644 Binary files a/man/freedombone-keydrive.1.gz and b/man/freedombone-keydrive.1.gz differ diff --git a/man/freedombone-logging.1.gz b/man/freedombone-logging.1.gz index 2b84e1e5..5f11db99 100644 Binary files a/man/freedombone-logging.1.gz and b/man/freedombone-logging.1.gz differ diff --git a/man/freedombone-mesh.1.gz b/man/freedombone-mesh.1.gz deleted file mode 100644 index 51cced10..00000000 Binary files a/man/freedombone-mesh.1.gz and /dev/null differ diff --git a/man/freedombone-mirrors.1.gz b/man/freedombone-mirrors.1.gz index 0eaec0ee..daa8aea5 100644 Binary files a/man/freedombone-mirrors.1.gz and b/man/freedombone-mirrors.1.gz differ diff --git a/man/freedombone-pass.1.gz b/man/freedombone-pass.1.gz index db38f117..3fb87957 100644 Binary files a/man/freedombone-pass.1.gz and b/man/freedombone-pass.1.gz differ diff --git a/man/freedombone-pin-cert.1.gz b/man/freedombone-pin-cert.1.gz index 1dfba8d8..9d6d5b53 100644 Binary files a/man/freedombone-pin-cert.1.gz and b/man/freedombone-pin-cert.1.gz differ diff --git a/man/freedombone-recoverkey.1.gz b/man/freedombone-recoverkey.1.gz index 1c73d8a3..a85f6e71 100644 Binary files a/man/freedombone-recoverkey.1.gz and b/man/freedombone-recoverkey.1.gz differ diff --git a/man/freedombone-remote.1.gz b/man/freedombone-remote.1.gz index 52f57034..de84c037 100644 Binary files a/man/freedombone-remote.1.gz and b/man/freedombone-remote.1.gz differ diff --git a/man/freedombone-renew-cert.1.gz b/man/freedombone-renew-cert.1.gz index 4f57a4cb..570a69d8 100644 Binary files a/man/freedombone-renew-cert.1.gz and b/man/freedombone-renew-cert.1.gz differ diff --git a/man/freedombone-repair-database.1.gz b/man/freedombone-repair-database.1.gz index 386b7502..9d22000d 100644 Binary files a/man/freedombone-repair-database.1.gz and b/man/freedombone-repair-database.1.gz differ diff --git a/man/freedombone-restore-local.1.gz b/man/freedombone-restore-local.1.gz index ce4cd56c..f60d4062 100644 Binary files a/man/freedombone-restore-local.1.gz and b/man/freedombone-restore-local.1.gz differ diff --git a/man/freedombone-restore-remote.1.gz b/man/freedombone-restore-remote.1.gz index 3e6b507a..d528c2e9 100644 Binary files a/man/freedombone-restore-remote.1.gz and b/man/freedombone-restore-remote.1.gz differ diff --git a/man/freedombone-rmemail.1.gz b/man/freedombone-rmemail.1.gz index 29a11d89..5f28696f 100644 Binary files a/man/freedombone-rmemail.1.gz and b/man/freedombone-rmemail.1.gz differ diff --git a/man/freedombone-rmlist.1.gz b/man/freedombone-rmlist.1.gz index 94437026..674b66f9 100644 Binary files a/man/freedombone-rmlist.1.gz and b/man/freedombone-rmlist.1.gz differ diff --git a/man/freedombone-rmsipuser.1.gz b/man/freedombone-rmsipuser.1.gz deleted file mode 100644 index e2bfe24f..00000000 Binary files a/man/freedombone-rmsipuser.1.gz and /dev/null differ diff --git a/man/freedombone-rmuser.1.gz b/man/freedombone-rmuser.1.gz index c2114e37..8866d247 100644 Binary files a/man/freedombone-rmuser.1.gz and b/man/freedombone-rmuser.1.gz differ diff --git a/man/freedombone-rmxmpp.1.gz b/man/freedombone-rmxmpp.1.gz deleted file mode 100644 index 4eea0e8b..00000000 Binary files a/man/freedombone-rmxmpp.1.gz and /dev/null differ diff --git a/man/freedombone-sec.1.gz b/man/freedombone-sec.1.gz index 394e0799..923096e6 100644 Binary files a/man/freedombone-sec.1.gz and b/man/freedombone-sec.1.gz differ diff --git a/man/freedombone-splitkey.1.gz b/man/freedombone-splitkey.1.gz index bc3235ec..13e20cef 100644 Binary files a/man/freedombone-splitkey.1.gz and b/man/freedombone-splitkey.1.gz differ diff --git a/man/freedombone-unignore.1.gz b/man/freedombone-unignore.1.gz index 90a458b7..716b76b5 100644 Binary files a/man/freedombone-unignore.1.gz and b/man/freedombone-unignore.1.gz differ diff --git a/man/freedombone-update-date.1.gz b/man/freedombone-update-date.1.gz index 442a6729..6bd356d0 100644 Binary files a/man/freedombone-update-date.1.gz and b/man/freedombone-update-date.1.gz differ diff --git a/man/freedombone-wifi.1.gz b/man/freedombone-wifi.1.gz index ed9a7724..37acd226 100644 Binary files a/man/freedombone-wifi.1.gz and b/man/freedombone-wifi.1.gz differ diff --git a/man/freedombone-xmpp-pass.1.gz b/man/freedombone-xmpp-pass.1.gz deleted file mode 100644 index 02d846bd..00000000 Binary files a/man/freedombone-xmpp-pass.1.gz and /dev/null differ diff --git a/man/freedombone-zram.1.gz b/man/freedombone-zram.1.gz index d4afa4b9..deae497d 100644 Binary files a/man/freedombone-zram.1.gz and b/man/freedombone-zram.1.gz differ diff --git a/man/freedombone.1.gz b/man/freedombone.1.gz index db0c9bbb..611d6035 100644 Binary files a/man/freedombone.1.gz and b/man/freedombone.1.gz differ diff --git a/src/freedombone-mesh b/src/freedombone-mesh deleted file mode 100755 index 9709649f..00000000 --- a/src/freedombone-mesh +++ /dev/null @@ -1,375 +0,0 @@ -#!/bin/bash -# -# .---. . . -# | | | -# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-. -# | | (.-' (.-' ( | ( )| | | | )( )| | (.-' -# ' ' --' --' -' - -' ' ' -' -' -' ' - --' -# -# Freedom in the Cloud -# -# A script to easily locate mesh peers and start communicating - -# License -# ======= -# -# Copyright (C) 2015-2018 Bob Mottram -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -PROJECT_NAME='freedombone' - -export TEXTDOMAIN=${PROJECT_NAME}-mesh -export TEXTDOMAINDIR="/usr/share/locale" - -CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg - -MUMBLE_PATH=/usr/bin/mumble -TOXIC_FILE=$(cat /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox | grep "TOXIC_FILE=" | head -n 1 | awk -F '=' '{print $2}') -DHTNODES=/usr/share/toxic/DHTnodes - -PEERS_FILE=/tmp/meshpeers.txt - -TOX_PORT=33445 -TOXCORE_REPO='https://github.com/irungentoo/toxcore' -TOXCORE_COMMIT= -# obtain tox values from main install -if grep -q "TOX_PORT=" $CONFIG_FILE; then - TOX_PORT=$(cat $CONFIG_FILE | grep "TOX_PORT=" | nead -n 1 | awk -F '=' '{print $2}') -fi -if grep -q "TOXCORE_REPO=" $CONFIG_FILE; then - TOXCORE_REPO=$(cat $CONFIG_FILE | grep "TOXCORE_REPO=" | head -n 1 | awk -F '"' '{print $2}') -fi -if grep -q "TOXCORE_COMMIT=" $CONFIG_FILE; then - TOXCORE_COMMIT=$(cat $CONFIG_FILE | grep "TOXCORE_COMMIT=" | head -n 1 | awk -F "'" '{print $2}') -fi -TOXID_REPO='https://github.com/bashrc/toxid' -TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt -QTOX_INI="/home/$USER/.config/tox/qtox.ini" - -# client or server installations sounds odd for a mesh, but this -# indicates whether this is a dedicated mesh peer ("yes") or -# a 'client' such as a laptop or desktop machine with -# the freedombone-client script installed -SERVER_INSTALLATION="no" - -function install_toxcore { - if [ -f /etc/tox-bootstrapd.conf ]; then - return - fi - - sudo apt-get -yq install build-essential libtool autotools-dev - sudo apt-get -yq install automake checkinstall check git yasm - sudo apt-get -yq install libsodium18 libsodium-dev libcap2-bin - sudo apt-get -yq install libconfig9 libconfig-dev - - if [ ! -d ~/develop ]; then - mkdir ~/develop - fi - cd ~/develop - git clone $TOXCORE_REPO ~/develop/toxcore - cd ~/develop/toxcore - if [ $TOXCORE_COMMIT ]; then - git checkout $TOXCORE_COMMIT -b $TOXCORE_COMMIT - fi - autoreconf -i - ./configure --enable-daemon - if [ ! "$?" = "0" ]; then - exit 78467 - fi - make - if [ ! "$?" = "0" ]; then - exit 84562 - fi - sudo make install - sudo cp /usr/local/lib/libtoxcore* /usr/lib/ - - if [ ! -f /usr/local/bin/tox-bootstrapd ]; then - echo $"File not found /usr/local/bin/tox-bootstrapd" - exit 73862 - fi - - sudo useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment "Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd - sudo chmod 700 /var/lib/tox-bootstrapd - if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf ]; then - echo $"File not found $INSTALL_DIR/toxcore/other/bootstrap_daemon/tox-bootstrapd.conf" - exit 476835 - fi - - # create configuration file - echo "port = $TOX_PORT" > /tmp/tox-bootstrapd.conf - echo 'keys_file_path = "/var/lib/tox-bootstrapd/keys"' >> /tmp/tox-bootstrapd.conf - echo 'pid_file_path = "/var/run/tox-bootstrapd/tox-bootstrapd.pid"' >> /tmp/tox-bootstrapd.conf - echo 'enable_ipv6 = true' >> /tmp/tox-bootstrapd.conf - echo 'enable_ipv4_fallback = true' >> /tmp/tox-bootstrapd.conf - echo 'enable_lan_discovery = true' >> /tmp/tox-bootstrapd.conf - echo 'enable_tcp_relay = true' >> /tmp/tox-bootstrapd.conf - echo "tcp_relay_ports = [443, 3389, $TOX_PORT]" >> /tmp/tox-bootstrapd.conf - echo 'enable_motd = true' >> /tmp/tox-bootstrapd.conf - echo 'motd = "tox-bootstrapd"' >> /tmp/tox-bootstrapd.conf - sudo cp /tmp/tox-bootstrapd.conf /etc/tox-bootstrapd.conf - rm /tmp/tox-bootstrapd.conf - - if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service ]; then - echo $"File not found ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service" - exit 7359 - fi - sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service /etc/systemd/system/ - - sudo systemctl daemon-reload - sudo systemctl enable tox-bootstrapd.service - sudo systemctl start tox-bootstrapd.service - if [ ! "$?" = "0" ]; then - sudo systemctl status tox-bootstrapd.service - exit 5846 - fi - - sudo systemctl restart tox-bootstrapd.service - - 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 - echo $'Could not obtain the tox node public key' - exit 6529 - fi - - # save the public key for later reference - echo "$TOX_PUBLIC_KEY" > /tmp/boostrapid - sudo mv /tmp/boostrapid $TOX_BOOTSTRAP_ID_FILE -} - -function install_toxid { - if [ -f /usr/local/bin/toxid ]; then - return - fi - cd ~/develop - git clone $TOXID_REPO ~/develop/toxid - cd ~/develop/toxid - make - sudo make install - - if [ ! -f /usr/local/bin/toxid ]; then - echo $"Couldn't install toxid" - exit 6389 - fi -} - -function run_tox { - echo $QTOX_INI - if [[ -f $TOXIC_FILE || -f $QTOX_INI ]]; then - if [[ $SERVER_INSTALLATION == "no" ]]; then - # update bootstrap nodes - if [ -f $DHTNODES ]; then - if [ ! -f $DHTNODES.internet ]; then - sudo cp $DHTNODES $DHTNODES.internet - fi - fi - lstox -f dht > /tmp/dht - sudo cp /tmp/dht $DHTNODES - fi - - # get a list of peers - PEER_TOX_ID_LIST=$(lstox | grep $AVAHI_DOMAIN | sort -u) - if [ ! "$PEER_TOX_ID_LIST" ]; then - echo $'No peers found' - exit 0 - fi - PEER_TOX_ID_LIST_COUNT=$(echo "$PEER_TOX_ID_LIST" | wc -l) - PEER_TOX_ID='' - if [ $PEER_TOX_ID_LIST_COUNT -lt "2" ]; then - # single peer - PEER_TOX_ID=$(echo "$PEER_TOX_ID_LIST" | awk -F ' ' '{print $3}') - else - # choose a user from a list - echo '' - echo $"Select a user on $AVAHI_DOMAIN:" - ctr=0 - while IFS='' read -r line || [[ -n "$line" ]]; do - toxusername=$(echo $line | awk -F ' ' '{print $2}') - echo " $ctr. $toxusername" - ctr=$((ctr + 1)) - done < "$PEER_TOX_ID_LIST" - read user_index - PEER_TOX_ID=$(echo "$PEER_TOX_ID_LIST" | tail -n+${user_index} | head -n1 | awk -F ' ' '{print $3}') - fi - - # if this is a valid ID - if [ ${#PEER_TOX_ID} -gt 30 ]; then - # start client and make a friend request - if [ -f $QTOX_INI ]; then - echo $'Launch qTox' - qtox & - else - - echo "n -/nick $USER -/add $PEER_TOX_ID -/exit -" | $TOXIC_FILE -d - # Running twice is a hack to get around buggyness in the client - $TOXIC_FILE -d - fi - exit 0 - else - # ID was invalid - echo $PEER_TOX_ID - echo $"Tox ID for $AVAHI_DOMAIN was not found" - exit 6 - fi - fi -} - -if [ -f /var/lib/batman ]; then - SERVER_INSTALLATION="yes" -fi - -if [[ $SERVER_INSTALLATION == "no" ]]; then - if [ ! -f /usr/bin/batman ]; then - ${PROJECT_NAME}-client - fi -fi - -# alternative toxic paths -if [ -f /usr/local/bin/toxic ]; then - TOXIC_FILE=/usr/local/bin/toxic -fi -if [ -f /usr/local/share/toxic/DHTnodes ]; then - DHTNODES=/usr/local/share/toxic/DHTnodes -fi - -if [[ $SERVER_INSTALLATION == "no" ]]; then - if [ ! -f /tmp/meshtype ]; then - install_toxcore - install_toxid - sudo batman start - if [ ! "$?" = "0" ]; then - exit 2 - fi - fi -fi - -avahi-browse -atl | awk -F ' ' '{print $4}' | sort -u > $PEERS_FILE - -if [ ! -f $PEERS_FILE ]; then - echo $'No peers were found' - exit 0 -fi - -ctr=0 -while IFS='' read -r line || [[ -n "$line" ]]; do - ctr=$((ctr + 1)) -done < "$PEERS_FILE" - -if [ ${ctr} -lt "1" ]; then - echo $'No peers were found' - exit 0 -fi - -clear -echo '' -echo ".---. . . " -echo "| | | " -echo "|--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-. " -echo "| | (.-' (.-' ( | ( )| | | | )( )| | (.-' " -echo "' ' --' --' -' - -' ' ' -' -' -' ' - --'" -echo $' Freedom in the Mesh' -echo '' -echo $'Please choose a peer to connect to:' -idx=1 -while IFS='' read -r line || [[ -n "$line" ]]; do - echo " $idx. $line" - idx=$((idx + 1)) -done < "$PEERS_FILE" - -peer_index=0 -read peer_index - -# if no selection made -if [ ! $peer_index ]; then - echo $'Nothing was selected' - echo '' - exit 0 -fi - -# get the avahi domain name -AVAHI_DOMAIN= -idx=1 -while IFS='' read -r line || [[ -n "$line" ]]; do - if [ ${idx} -eq "$peer_index" ]; then - AVAHI_DOMAIN=${line}.local - fi - idx=$((idx + 1)) -done < "$PEERS_FILE" - -if [ ! $AVAHI_DOMAIN ]; then - echo $'No domain name' - exit 3 -fi - -# if only mumble is installed -if [ ! -f $TOXIC_FILE ]; then - if [ -f $MUMBLE_PATH ]; then - $MUMBLE_PATH & - exit 0 - fi - echo $'You need mumble/toxic/qTox installed on your system' - if [[ $SERVER_INSTALLATION == "no" ]]; then - sudo batman stop - fi - exit 4 -fi - -# if only tox is installed -if [ ! -f $MUMBLE_PATH ]; then - run_tox -fi - -echo '' -echo $'Choose communication service:' -echo $' 1. Voice' -echo $' 2. Tox Chat' -echo '' - -read peer_index - -# if no selection made -if [ ! $peer_index ]; then - echo $'Nothing was selected' - echo '' - exit 0 -fi - -if [[ $peer_index == 1 ]]; then - if [ -f $MUMBLE_PATH ]; then - echo '' - echo $'To setup for the first time click "Add New", then set:' - echo $" Label: $AVAHI_DOMAIN" - echo $" Address: $AVAHI_DOMAIN" - echo $' Port: 64738' - echo $" Username: $USER" - echo '' - echo $'Press Enter to continue.' - echo '' - read peer_index - $MUMBLE_PATH & - else - echo $'Mumble may not be installed on this system' - exit 5 - fi -fi - -if [[ $peer_index == 2 ]]; then - run_tox -fi - -exit 0 diff --git a/src/freedombone-xmpp-pass b/src/freedombone-xmpp-pass deleted file mode 100755 index 78120c26..00000000 --- a/src/freedombone-xmpp-pass +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -# -# .---. . . -# | | | -# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-. -# | | (.-' (.-' ( | ( )| | | | )( )| | (.-' -# ' ' --' --' -' - -' ' ' -' -' -' ' - --' -# -# Freedom in the Cloud -# - -# Changes the password for an XMPP user - -# License -# ======= -# -# Copyright (C) 2015-2018 Bob Mottram -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -PROJECT_NAME='freedombone' - -export TEXTDOMAIN=${PROJECT_NAME}-xmpp-pass -export TEXTDOMAINDIR="/usr/share/locale" - -EMAIL_ADDRESS= - -function show_help { - echo '' - echo $"${PROJECT_NAME}-xmpp-pass -e [email address]" - echo '' - exit 0 -} - -while [[ $# > 1 ]] -do -key="$1" - -case $key in - -h|--help) - show_help - ;; - -e|--email) - shift - EMAIL_ADDRESS="$1" - ;; - *) - # unknown option - ;; -esac -shift -done - -if [ ! $EMAIL_ADDRESS ]; then - show_help -fi - -prosodyctl passwd $EMAIL_ADDRESS - -exit 0