Change email address

This commit is contained in:
Bob Mottram 2016-10-31 16:24:49 +00:00
parent f44e7ea8a9
commit 557b25b4a8
150 changed files with 1202 additions and 1217 deletions

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Control Panel #+DESCRIPTION: Control Panel
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Frequently asked questions #+DESCRIPTION: Frequently asked questions
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Mirroring git repositories #+DESCRIPTION: Mirroring git repositories
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil
@ -26,7 +26,7 @@ This site can also be accessed via a Tor browser at *http://2tp3f6vtvhkqpuc6.oni
*PGP/GPG Fingerprint:* D538 1159 CD7A 2F80 2F06 ABA0 0452 CC7C EA98 2E38 *PGP/GPG Fingerprint:* D538 1159 CD7A 2F80 2F06 ABA0 0452 CC7C EA98 2E38
*XMPP:* bob@robotics.uk.to with OTR *XMPP:* bob@freedombone.net with OMEMO or OTR
*Tox:* 82DD53788AB400843BC75EA96B62DD6C76D2B13E476B995B13C49920A3C8FD32E5365A82FA83 *Tox:* 82DD53788AB400843BC75EA96B62DD6C76D2B13E476B995B13C49920A3C8FD32E5365A82FA83

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, hubzilla, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -1,6 +1,6 @@
#+TITLE: #+TITLE:
#+AUTHOR: Bob Mottram #+AUTHOR: Bob Mottram
#+EMAIL: bob@robotics.uk.to #+EMAIL: bob@freedombone.net
#+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber #+KEYWORDS: freedombox, debian, beaglebone, red matrix, email, web server, home server, internet, censorship, surveillance, social network, irc, jabber
#+DESCRIPTION: Turn the Beaglebone Black into a personal communications server #+DESCRIPTION: Turn the Beaglebone Black into a personal communications server
#+OPTIONS: ^:nil toc:nil #+OPTIONS: ^:nil toc:nil

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by
@ -52,32 +52,32 @@ do
key="$1" key="$1"
case $key in case $key in
-h|--help) -h|--help)
show_help show_help
;; ;;
-u|--user) -u|--user)
shift shift
MYUSERNAME="$1" MYUSERNAME="$1"
;; ;;
-e|--email) -e|--email)
shift shift
EMAILADDRESS="$1" EMAILADDRESS="$1"
;; ;;
-s|--subject) -s|--subject)
shift shift
SUBJECT_TEXT="$1" SUBJECT_TEXT="$1"
;; ;;
-g|--group) -g|--group)
shift shift
GROUP_NAME="$1" GROUP_NAME="$1"
;; ;;
-p|--public) -p|--public)
shift shift
PUBLIC="$1" PUBLIC="$1"
;; ;;
*) *)
# unknown option # unknown option
;; ;;
esac esac
shift shift
done done
@ -88,7 +88,7 @@ fi
if [ ${#EMAILADDRESS} -lt 2 ]; then if [ ${#EMAILADDRESS} -lt 2 ]; then
if [ ${#SUBJECT_TEXT} -lt 2 ]; then if [ ${#SUBJECT_TEXT} -lt 2 ]; then
show_help show_help
fi fi
fi fi
@ -112,26 +112,26 @@ fi
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
if ! grep -q "$proc_comment" $PM; then if ! grep -q "$proc_comment" $PM; then
if [[ $PUBLIC != "yes" ]]; then if [[ $PUBLIC != "yes" ]]; then
# private emails go after the encryption stage # private emails go after the encryption stage
echo '' >> $PM echo '' >> $PM
echo "$proc_comment" >> $PM echo "$proc_comment" >> $PM
echo ":0" >> $PM echo ":0" >> $PM
echo "$proc_rule" >> $PM echo "$proc_rule" >> $PM
echo "$LISTDIR/new" >> $PM echo "$LISTDIR/new" >> $PM
echo "# End of rule" >> $PM echo "# End of rule" >> $PM
else else
# public emails are copied before the encryption stage # public emails are copied before the encryption stage
if ! grep -q '# encrypt' $PM; then if ! grep -q '# encrypt' $PM; then
echo '' >> $PM echo '' >> $PM
echo "$proc_comment" >> $PM echo "$proc_comment" >> $PM
echo ":0" >> $PM echo ":0" >> $PM
echo "$proc_rule" >> $PM echo "$proc_rule" >> $PM
echo "$LISTDIR/new" >> $PM echo "$LISTDIR/new" >> $PM
echo "# End of rule" >> $PM echo "# End of rule" >> $PM
else else
filter=$(echo "$proc_comment\n:0\n${proc_rule}\n$LISTDIR/new\n# End of rule\n") filter=$(echo "$proc_comment\n:0\n${proc_rule}\n$LISTDIR/new\n# End of rule\n")
sed -i "/# encrypt/i ${filter}" $PM sed -i "/# encrypt/i ${filter}" $PM
fi fi
fi fi
chown $MYUSERNAME:$MYUSERNAME $PM chown $MYUSERNAME:$MYUSERNAME $PM
fi fi
@ -150,8 +150,8 @@ fi
MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC) MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC)
if [[ $MUTT_MAILBOXES != *$GROUP_NAME* ]]; then if [[ $MUTT_MAILBOXES != *$GROUP_NAME* ]]; then
if ! grep -q "=$GROUP_NAME" $MUTTRC; then if ! grep -q "=$GROUP_NAME" $MUTTRC; then
sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$GROUP_NAME|g" $MUTTRC sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$GROUP_NAME|g" $MUTTRC
chown $MYUSERNAME:$MYUSERNAME $MUTTRC chown $MYUSERNAME:$MYUSERNAME $MUTTRC
fi fi
fi fi

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by
@ -52,32 +52,32 @@ do
key="$1" key="$1"
case $key in case $key in
-h|--help) -h|--help)
show_help show_help
;; ;;
-u|--user) -u|--user)
shift shift
MYUSERNAME="$1" MYUSERNAME="$1"
;; ;;
-l|--list) -l|--list)
shift shift
MAILINGLIST="$1" MAILINGLIST="$1"
;; ;;
-s|--subject) -s|--subject)
shift shift
SUBJECTTAG="$1" SUBJECTTAG="$1"
;; ;;
-e|--email) -e|--email)
shift shift
LIST_ADDRESS="$1" LIST_ADDRESS="$1"
;; ;;
-p|--public) -p|--public)
shift shift
PUBLIC="$1" PUBLIC="$1"
;; ;;
*) *)
# unknown option # unknown option
;; ;;
esac esac
shift shift
done done
@ -110,33 +110,33 @@ chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
if [ ${#SUBJECTTAG} -gt 0 ]; then if [ ${#SUBJECTTAG} -gt 0 ]; then
# use the subject tag # use the subject tag
if ! grep -q "Subject:.*()\[$SUBJECTTAG\]" $PM; then if ! grep -q "Subject:.*()\[$SUBJECTTAG\]" $PM; then
if [[ $PUBLIC != "yes" ]]; then if [[ $PUBLIC != "yes" ]]; then
# private emails go after the encryption stage # private emails go after the encryption stage
filter=" filter="
# Email rule for $MAILINGLIST subject [$SUBJECTTAG] # Email rule for $MAILINGLIST subject [$SUBJECTTAG]
:0 :0
* ^Subject:.*()\[$SUBJECTTAG\] * ^Subject:.*()\[$SUBJECTTAG\]
$LISTDIR/new $LISTDIR/new
# End of rule # End of rule
" "
echo "$filter" >> $PM echo "$filter" >> $PM
else else
# public emails are copied before hte encryption stage # public emails are copied before hte encryption stage
if ! grep -q '# encrypt' $PM; then if ! grep -q '# encrypt' $PM; then
filter=" filter="
# Email rule for $MAILINGLIST subject [$SUBJECTTAG] # Email rule for $MAILINGLIST subject [$SUBJECTTAG]
:0 :0
* ^Subject:.*()\[$SUBJECTTAG\] * ^Subject:.*()\[$SUBJECTTAG\]
$LISTDIR/new $LISTDIR/new
# End of rule # End of rule
" "
echo "$filter" >> $PM echo "$filter" >> $PM
else else
filter=$(echo "# Email rule for $MAILINGLIST subject [$SUBJECTTAG]\n:0\n * ^Subject:.*()\\\[$SUBJECTTAG\\\]\n$LISTDIR/new\n# End of rule\n") filter=$(echo "# Email rule for $MAILINGLIST subject [$SUBJECTTAG]\n:0\n * ^Subject:.*()\\\[$SUBJECTTAG\\\]\n$LISTDIR/new\n# End of rule\n")
sed -i "/# encrypt/i ${filter}" $PM sed -i "/# encrypt/i ${filter}" $PM
fi fi
fi fi
chown $MYUSERNAME:$MYUSERNAME $PM chown $MYUSERNAME:$MYUSERNAME $PM
fi fi
else else
exit $(${PROJECT_NAME}-addemail -u $MYUSERNAME -e $LIST_ADDRESS -g $MAILINGLIST --public $PUBLIC) exit $(${PROJECT_NAME}-addemail -u $MYUSERNAME -e $LIST_ADDRESS -g $MAILINGLIST --public $PUBLIC)
@ -156,15 +156,15 @@ fi
MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC) MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC)
if [[ $MUTT_MAILBOXES != *$MAILINGLIST* ]]; then if [[ $MUTT_MAILBOXES != *$MAILINGLIST* ]]; then
if ! grep -q "=$MAILINGLIST" $MUTTRC; then if ! grep -q "=$MAILINGLIST" $MUTTRC; then
sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$MAILINGLIST|g" $MUTTRC sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$MAILINGLIST|g" $MUTTRC
chown $MYUSERNAME:$MYUSERNAME $MUTTRC chown $MYUSERNAME:$MYUSERNAME $MUTTRC
fi fi
fi fi
if [ $LIST_ADDRESS ]; then if [ $LIST_ADDRESS ]; then
sed -i "s|unsubscribe $LIST_ADDRESS|subscribe $LIST_ADDRESS|g" $MUTTRC sed -i "s|unsubscribe $LIST_ADDRESS|subscribe $LIST_ADDRESS|g" $MUTTRC
if ! grep -q "subscribe $LIST_ADDRESS" $MUTTRC; then if ! grep -q "subscribe $LIST_ADDRESS" $MUTTRC; then
echo "subscribe $LIST_ADDRESS" >> $MUTTRC echo "subscribe $LIST_ADDRESS" >> $MUTTRC
fi fi
fi fi

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by
@ -50,10 +50,10 @@ function show_help {
function sip_user_exists { function sip_user_exists {
IFS='' IFS=''
while read line; do while read line; do
if [[ "$line" == *"<user id=\"$MY_USERNAME\">" ]]; then if [[ "$line" == *"<user id=\"$MY_USERNAME\">" ]]; then
USER_EXISTS="yes" USER_EXISTS="yes"
return return
fi fi
done < $CONFIG_FILE done < $CONFIG_FILE
} }
@ -61,28 +61,28 @@ function update_sip_user {
USER_FOUND= USER_FOUND=
NEW_CONFIG_FILE="${CONFIG_FILE}.new" NEW_CONFIG_FILE="${CONFIG_FILE}.new"
if [ -f $NEW_CONFIG_FILE ]; then if [ -f $NEW_CONFIG_FILE ]; then
rm -f $NEW_CONFIG_FILE rm -f $NEW_CONFIG_FILE
fi fi
touch $NEW_CONFIG_FILE touch $NEW_CONFIG_FILE
IFS='' IFS=''
while read line; do while read line; do
if [ ! $USER_FOUND ]; then if [ ! $USER_FOUND ]; then
if [[ "$line" == *"<user id=\"$MY_USERNAME\">" ]]; then if [[ "$line" == *"<user id=\"$MY_USERNAME\">" ]]; then
USER_FOUND="yes" USER_FOUND="yes"
fi fi
else else
if [[ "$line" == *"<extension>"* ]]; then if [[ "$line" == *"<extension>"* ]]; then
line=" <extension>$EXTENSION</extension>" line=" <extension>$EXTENSION</extension>"
fi fi
if [[ "$line" == *"<secret>"* ]]; then if [[ "$line" == *"<secret>"* ]]; then
line=" <secret>$PASSWORD</secret>" line=" <secret>$PASSWORD</secret>"
fi fi
if [[ "$line" == *"<display>"* ]]; then if [[ "$line" == *"<display>"* ]]; then
line=" <display>$MY_USERNAME $EXTENSION</display>" line=" <display>$MY_USERNAME $EXTENSION</display>"
USER_FOUND= USER_FOUND=
fi fi
fi fi
echo $line >> $NEW_CONFIG_FILE echo $line >> $NEW_CONFIG_FILE
done < $CONFIG_FILE done < $CONFIG_FILE
mv $NEW_CONFIG_FILE $CONFIG_FILE mv $NEW_CONFIG_FILE $CONFIG_FILE
} }
@ -90,19 +90,19 @@ function update_sip_user {
function add_sip_user { function add_sip_user {
NEW_CONFIG_FILE="${CONFIG_FILE}.new" NEW_CONFIG_FILE="${CONFIG_FILE}.new"
if [ -f $NEW_CONFIG_FILE ]; then if [ -f $NEW_CONFIG_FILE ]; then
rm -f $NEW_CONFIG_FILE rm -f $NEW_CONFIG_FILE
fi fi
touch $NEW_CONFIG_FILE touch $NEW_CONFIG_FILE
IFS='' IFS=''
while read line; do while read line; do
if [[ "$line" == *'</provision>' ]]; then if [[ "$line" == *'</provision>' ]]; then
echo " <user id=\"$MY_USERNAME\">" >> $NEW_CONFIG_FILE echo " <user id=\"$MY_USERNAME\">" >> $NEW_CONFIG_FILE
echo " <extension>$EXTENSION</extension>" >> $NEW_CONFIG_FILE echo " <extension>$EXTENSION</extension>" >> $NEW_CONFIG_FILE
echo " <secret>$PASSWORD</secret>" >> $NEW_CONFIG_FILE echo " <secret>$PASSWORD</secret>" >> $NEW_CONFIG_FILE
echo " <display>$MY_USERNAME $EXTENSION</display>" >> $NEW_CONFIG_FILE echo " <display>$MY_USERNAME $EXTENSION</display>" >> $NEW_CONFIG_FILE
echo ' </user>' >> $NEW_CONFIG_FILE echo ' </user>' >> $NEW_CONFIG_FILE
fi fi
echo $line >> $NEW_CONFIG_FILE echo $line >> $NEW_CONFIG_FILE
done < $CONFIG_FILE done < $CONFIG_FILE
mv $NEW_CONFIG_FILE $CONFIG_FILE mv $NEW_CONFIG_FILE $CONFIG_FILE
usermod -aG sipwitch $MY_USERNAME usermod -aG sipwitch $MY_USERNAME
@ -113,24 +113,24 @@ do
key="$1" key="$1"
case $key in case $key in
-h|--help) -h|--help)
show_help show_help
;; ;;
-u|--user) -u|--user)
shift shift
MY_USERNAME="$1" MY_USERNAME="$1"
;; ;;
-e|--extension) -e|--extension)
shift shift
EXTENSION="$1" EXTENSION="$1"
;; ;;
-p|--password) -p|--password)
shift shift
PASSWORD="$1" PASSWORD="$1"
;; ;;
*) *)
# unknown option # unknown option
;; ;;
esac esac
shift shift
done done

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -16,7 +16,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -11,7 +11,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -17,7 +17,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by
@ -131,104 +131,104 @@ aDWQRvTrh5+SQAlDi0gcbNeImgAu1e44K8kZDab8Am5HlVjkR1Z36aqeMFDidlaU
' '
function show_help { function show_help {
echo '' echo ''
echo $"${PROJECT_NAME}-dhparam -h [hostname] -l [length in bits] --recalc [yes|no] --fast [yes|no]" echo $"${PROJECT_NAME}-dhparam -h [hostname] -l [length in bits] --recalc [yes|no] --fast [yes|no]"
echo '' echo ''
exit 0 exit 0
} }
function calc_dh { function calc_dh {
if [[ $FAST == 'yes' ]]; then if [[ $FAST == 'yes' ]]; then
DHGROUP=$(( ( RANDOM % 4 ) + 14 )) DHGROUP=$(( ( RANDOM % 4 ) + 14 ))
if [[ ${DHGROUP} == 14 ]]; then if [[ ${DHGROUP} == 14 ]]; then
echo "$BETTERCRYPTO_GROUP14" > ${1} echo "$BETTERCRYPTO_GROUP14" > ${1}
else else
if [[ ${DHGROUP} == 15 ]]; then if [[ ${DHGROUP} == 15 ]]; then
echo "$BETTERCRYPTO_GROUP15" > ${1} echo "$BETTERCRYPTO_GROUP15" > ${1}
else else
if [[ ${DHGROUP} == 16 ]]; then if [[ ${DHGROUP} == 16 ]]; then
echo "$BETTERCRYPTO_GROUP16" > ${1} echo "$BETTERCRYPTO_GROUP16" > ${1}
else else
if [[ ${DHGROUP} == 17 ]]; then if [[ ${DHGROUP} == 17 ]]; then
echo "$BETTERCRYPTO_GROUP17" > ${1} echo "$BETTERCRYPTO_GROUP17" > ${1}
else else
echo "$BETTERCRYPTO_GROUP18" > ${1} echo "$BETTERCRYPTO_GROUP18" > ${1}
fi fi
fi fi
fi fi
fi fi
else else
openssl dhparam -check -text $KEYLENGTH -out ${1} openssl dhparam -check -text $KEYLENGTH -out ${1}
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then
exit 3674 exit 3674
fi fi
fi fi
chmod 640 ${1} chmod 640 ${1}
} }
function regenerate_dh_keys { function regenerate_dh_keys {
for file in /etc/ssl/mycerts/* for file in /etc/ssl/mycerts/*
do do
if [[ -f $file ]]; then if [[ -f $file ]]; then
filename=/etc/ssl/certs/$(echo $file | awk -F '/etc/ssl/mycerts/' '{print $2}' | awk -F '.crt' '{print $1}').dhparam filename=/etc/ssl/certs/$(echo $file | awk -F '/etc/ssl/mycerts/' '{print $2}' | awk -F '.crt' '{print $1}').dhparam
if [ -f $filename ]; then if [ -f $filename ]; then
calc_dh $filename calc_dh $filename
echo $"Recalculated DH params for $filename" echo $"Recalculated DH params for $filename"
fi fi
fi fi
done done
} }
while [[ $# > 1 ]] while [[ $# > 1 ]]
do do
key="$1" key="$1"
case $key in case $key in
--help) --help)
show_help show_help
;; ;;
-h|--hostname) -h|--hostname)
shift shift
HOSTNAME="$1" HOSTNAME="$1"
;; ;;
-l|--dhkey) -l|--dhkey)
shift shift
KEYLENGTH=${1} KEYLENGTH=${1}
;; ;;
--recalc) --recalc)
shift shift
RECALCULATE=${1} RECALCULATE=${1}
;; ;;
--fast) --fast)
shift shift
if [[ ${1} == $"yes" || ${1} == $"y" ]]; then if [[ ${1} == $"yes" || ${1} == $"y" ]]; then
FAST='yes' FAST='yes'
fi fi
;; ;;
*) *)
# unknown option # unknown option
;; ;;
esac esac
shift shift
done done
if [[ $RECALCULATE == "yes" || $RECALCULATE == "y" ]]; then if [[ $RECALCULATE == "yes" || $RECALCULATE == "y" ]]; then
regenerate_dh_keys regenerate_dh_keys
exit 0 exit 0
fi fi
if [ ! $HOSTNAME ]; then if [ ! $HOSTNAME ]; then
echo $'No hostname specified' echo $'No hostname specified'
exit 5728 exit 5728
fi fi
if ! which openssl > /dev/null ;then if ! which openssl > /dev/null ;then
echo $"$0: openssl is not installed, exiting" 1>&2 echo $"$0: openssl is not installed, exiting" 1>&2
exit 5689 exit 5689
fi fi
if [ ! -d /etc/ssl/mycerts ]; then if [ ! -d /etc/ssl/mycerts ]; then
mkdir -p /etc/ssl/mycerts mkdir -p /etc/ssl/mycerts
fi fi
calc_dh /etc/ssl/certs/$HOSTNAME.dhparam calc_dh /etc/ssl/certs/$HOSTNAME.dhparam

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -15,7 +15,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -15,7 +15,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by
@ -58,205 +58,205 @@ TITLE='Remote Backup'
RECIPROCAL="no" RECIPROCAL="no"
function show_help { function show_help {
echo '' echo ''
echo $"${PROJECT_NAME}-remote -u [username] -l [backup list filename] -m [min password length]" echo $"${PROJECT_NAME}-remote -u [username] -l [backup list filename] -m [min password length]"
echo '' echo ''
echo $'Creates an inventory of remote backup locations' echo $'Creates an inventory of remote backup locations'
echo '' echo ''
echo '' echo ''
echo $' -h --help Show help' echo $' -h --help Show help'
echo $' -u --username User to create the backups.list file for' echo $' -u --username User to create the backups.list file for'
echo $' -l --list Remote backup list (usually /home/$USER/backup.list)' echo $' -l --list Remote backup list (usually /home/$USER/backup.list)'
echo $' -m --min Minimum password length (characters)' echo $' -m --min Minimum password length (characters)'
echo $' -r --reciprocal Whether to add reciprocal user accounts' echo $' -r --reciprocal Whether to add reciprocal user accounts'
echo $' -t --title Title shown' echo $' -t --title Title shown'
echo '' echo ''
exit 0 exit 0
} }
# Get the commandline options # Get the commandline options
while [[ $# > 1 ]] while [[ $# > 1 ]]
do do
key="$1" key="$1"
case $key in case $key in
-h|--help) -h|--help)
show_help show_help
;; ;;
# backup list filename # backup list filename
# typically /home/$USER/backup.list # typically /home/$USER/backup.list
-l|--list) -l|--list)
shift shift
FRIENDS_SERVERS_LIST="$1" FRIENDS_SERVERS_LIST="$1"
;; ;;
# username within /home # username within /home
-u|--user) -u|--user)
shift shift
MY_USERNAME="$1" MY_USERNAME="$1"
;; ;;
# Minimum password length # Minimum password length
-m|--min) -m|--min)
shift shift
MINIMUM_PASSWORD_LENGTH="$1" MINIMUM_PASSWORD_LENGTH="$1"
;; ;;
# Title shown # Title shown
-t|--title) -t|--title)
shift shift
TITLE="$1" TITLE="$1"
;; ;;
# reciprocal user accounts # reciprocal user accounts
-r|--reciprocal) -r|--reciprocal)
shift shift
RECIPROCAL="yes" RECIPROCAL="yes"
;; ;;
*) *)
# unknown option # unknown option
;; ;;
esac esac
shift shift
done done
function interactive_config_remote_backups { function interactive_config_remote_backups {
if [ ! $MY_USERNAME ]; then if [ ! $MY_USERNAME ]; then
echo $'Please specify a username with the -u option' echo $'Please specify a username with the -u option'
exit 7356 exit 7356
fi fi
if [ ! /home/$MY_USERNAME ]; then if [ ! /home/$MY_USERNAME ]; then
echo $"The user /home/$MY_USERNAME does not exist on the system" echo $"The user /home/$MY_USERNAME does not exist on the system"
exit 3689 exit 3689
fi fi
if [ ! $FRIENDS_SERVERS_LIST ]; then if [ ! $FRIENDS_SERVERS_LIST ]; then
FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list
fi fi
# clear any existing list # clear any existing list
if [ -f $FRIENDS_SERVERS_LIST ]; then if [ -f $FRIENDS_SERVERS_LIST ]; then
rm -f $FRIENDS_SERVERS_LIST rm -f $FRIENDS_SERVERS_LIST
touch $FRIENDS_SERVERS_LIST touch $FRIENDS_SERVERS_LIST
fi fi
# number of entries made # number of entries made
entering_remote_backups_ctr=1 entering_remote_backups_ctr=1
entering_remote_backups_done="no" entering_remote_backups_done="no"
remote_ssh_username="" remote_ssh_username=""
remote_ssh_domain="" remote_ssh_domain=""
remote_ssh_port="" remote_ssh_port=""
remote_ssh_password="" remote_ssh_password=""
remote_ssh_reciprocal_username="" remote_ssh_reciprocal_username=""
remote_ssh_reciprocal_password="" remote_ssh_reciprocal_password=""
while [[ $entering_remote_backups_done == "no" ]] while [[ $entering_remote_backups_done == "no" ]]
do do
data=$(tempfile 2>/dev/null) data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15 trap "rm -f $data" 0 1 2 5 15
if [[ $RECIPROCAL == "yes" ]]; then if [[ $RECIPROCAL == "yes" ]]; then
dialog --backtitle "Freedombone Configuration" \ dialog --backtitle "Freedombone Configuration" \
--title "$TITLE ${entering_remote_backups_ctr}" \ --title "$TITLE ${entering_remote_backups_ctr}" \
--form "\nPlease specify the SSH login details for the remote server\n\nThe reciprocal entries are optional, and can be used if you wish to set up a user account on this system for whoever runs the remote server to also use for backups" 20 50 8 \ --form "\nPlease specify the SSH login details for the remote server\n\nThe reciprocal entries are optional, and can be used if you wish to set up a user account on this system for whoever runs the remote server to also use for backups" 20 50 8 \
"Username:" 1 1 "$remote_ssh_username" 1 23 16 15 \ "Username:" 1 1 "$remote_ssh_username" 1 23 16 15 \
"Domain:" 2 1 "$remote_ssh_domain" 2 23 16 15 \ "Domain:" 2 1 "$remote_ssh_domain" 2 23 16 15 \
"SSH port:" 3 1 "2222" 3 23 5 4 \ "SSH port:" 3 1 "2222" 3 23 5 4 \
"Password:" 4 1 "$remote_ssh_password" 4 23 20 100 \ "Password:" 4 1 "$remote_ssh_password" 4 23 20 100 \
"Reciprocal Username:" 5 1 "$remote_ssh_reciprocal_username" 5 23 20 100 \ "Reciprocal Username:" 5 1 "$remote_ssh_reciprocal_username" 5 23 20 100 \
"Reciprocal Password:" 6 1 "$remote_ssh_reciprocal_password" 6 23 20 100 \ "Reciprocal Password:" 6 1 "$remote_ssh_reciprocal_password" 6 23 20 100 \
2> $data 2> $data
else else
dialog --backtitle "Freedombone Configuration" \ dialog --backtitle "Freedombone Configuration" \
--title "$TITLE ${entering_remote_backups_ctr}" \ --title "$TITLE ${entering_remote_backups_ctr}" \
--form "\nPlease specify the SSH login details for the remote server" 15 50 4 \ --form "\nPlease specify the SSH login details for the remote server" 15 50 4 \
"Username:" 1 1 "$remote_ssh_username" 1 23 16 15 \ "Username:" 1 1 "$remote_ssh_username" 1 23 16 15 \
"Domain:" 2 1 "$remote_ssh_domain" 2 23 16 15 \ "Domain:" 2 1 "$remote_ssh_domain" 2 23 16 15 \
"SSH port:" 3 1 "2222" 3 23 5 4 \ "SSH port:" 3 1 "2222" 3 23 5 4 \
"Password:" 4 1 "$remote_ssh_password" 4 23 20 100 \ "Password:" 4 1 "$remote_ssh_password" 4 23 20 100 \
2> $data 2> $data
fi fi
sel=$? sel=$?
case $sel in case $sel in
1) entering_remote_backups_done="yes";; 1) entering_remote_backups_done="yes";;
255) entering_remote_backups_done="yes";; 255) entering_remote_backups_done="yes";;
esac esac
remote_ssh_username=$(cat $data | sed -n 1p) remote_ssh_username=$(cat $data | sed -n 1p)
remote_ssh_domain=$(cat $data | sed -n 2p) remote_ssh_domain=$(cat $data | sed -n 2p)
remote_ssh_port=$(cat $data | sed -n 3p) remote_ssh_port=$(cat $data | sed -n 3p)
remote_ssh_password=$(cat $data | sed -n 4p) remote_ssh_password=$(cat $data | sed -n 4p)
remote_ssh_reciprocal_username=$(cat $data | sed -n 5p) remote_ssh_reciprocal_username=$(cat $data | sed -n 5p)
remote_ssh_reciprocal_password=$(cat $data | sed -n 6p) remote_ssh_reciprocal_password=$(cat $data | sed -n 6p)
if [[ $remote_ssh_username != "" && \ if [[ $remote_ssh_username != "" && \
$remote_ssh_domain != "" && \ $remote_ssh_domain != "" && \
$remote_ssh_port != "" && \ $remote_ssh_port != "" && \
$remote_ssh_password != "" ]]; then $remote_ssh_password != "" ]]; then
if [ ${#remote_ssh_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then if [ ${#remote_ssh_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then
dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40 dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40
else else
if [[ $RECIPROCAL == "yes" ]]; then if [[ $RECIPROCAL == "yes" ]]; then
if [[ $remote_ssh_reciprocal_username != "" && \ if [[ $remote_ssh_reciprocal_username != "" && \
$remote_ssh_reciprocal_password != "" ]]; then $remote_ssh_reciprocal_password != "" ]]; then
if [ ${#remote_ssh_reciprocal_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then if [ ${#remote_ssh_reciprocal_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then
dialog --title "Password quality check" --msgbox "The reciprocal password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40 dialog --title "Password quality check" --msgbox "The reciprocal password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40
else else
echo ${remote_ssh_reciprocal_username}:${remote_ssh_reciprocal_password}::::/home/${remote_ssh_reciprocal_username}:bash | newusers echo ${remote_ssh_reciprocal_username}:${remote_ssh_reciprocal_password}::::/home/${remote_ssh_reciprocal_username}:bash | newusers
echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST
remote_ssh_username="" remote_ssh_username=""
remote_ssh_domain="" remote_ssh_domain=""
remote_ssh_port="" remote_ssh_port=""
remote_ssh_password="" remote_ssh_password=""
remote_ssh_reciprocal_username="" remote_ssh_reciprocal_username=""
remote_ssh_reciprocal_password="" remote_ssh_reciprocal_password=""
entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1))
fi fi
else else
echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST
remote_ssh_username="" remote_ssh_username=""
remote_ssh_domain="" remote_ssh_domain=""
remote_ssh_port="" remote_ssh_port=""
remote_ssh_password="" remote_ssh_password=""
remote_ssh_reciprocal_username="" remote_ssh_reciprocal_username=""
remote_ssh_reciprocal_password="" remote_ssh_reciprocal_password=""
entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1))
fi fi
else else
echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST echo "$remote_ssh_username@$remote_ssh_domain $remote_ssh_port /home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST
remote_ssh_username="" remote_ssh_username=""
remote_ssh_domain="" remote_ssh_domain=""
remote_ssh_port="" remote_ssh_port=""
remote_ssh_password="" remote_ssh_password=""
entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1)) entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1))
fi fi
fi fi
else else
entering_remote_backups_done="yes" entering_remote_backups_done="yes"
fi fi
done done
if [ -f $FRIENDS_SERVERS_LIST ]; then if [ -f $FRIENDS_SERVERS_LIST ]; then
chown $MY_USERNAME:$MY_USERNAME $FRIENDS_SERVERS_LIST chown $MY_USERNAME:$MY_USERNAME $FRIENDS_SERVERS_LIST
fi fi
} }
function show_result { function show_result {
clear clear
if (( $entering_remote_backups_ctr < 2 )); then if (( $entering_remote_backups_ctr < 2 )); then
echo $'No remote backup locations were specified' echo $'No remote backup locations were specified'
exit 0 exit 0
fi fi
if [ ! -f $FRIENDS_SERVERS_LIST ]; then if [ ! -f $FRIENDS_SERVERS_LIST ]; then
echo $"No remote backups list found: $FRIENDS_SERVERS_LIST" echo $"No remote backups list found: $FRIENDS_SERVERS_LIST"
exit 7358 exit 7358
fi fi
echo '' echo ''
echo $"Remote backups list: $FRIENDS_SERVERS_LIST" echo $"Remote backups list: $FRIENDS_SERVERS_LIST"
echo '' echo ''
echo $'Contents:' echo $'Contents:'
echo '' echo ''
cat $FRIENDS_SERVERS_LIST cat $FRIENDS_SERVERS_LIST
echo '' echo ''
} }
if [ ! $FRIENDS_SERVERS_LIST ]; then if [ ! $FRIENDS_SERVERS_LIST ]; then
FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list
fi fi
interactive_config_remote_backups interactive_config_remote_backups

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by
@ -38,10 +38,10 @@ CONFIG_FILE=/etc/sipwitch.conf
maxnum=201 maxnum=201
while (( maxnum < 299 )); do while (( maxnum < 299 )); do
if ! grep -q "extension>$maxnum<" $CONFIG_FILE; then if ! grep -q "extension>$maxnum<" $CONFIG_FILE; then
break; break;
fi fi
maxnum=$((maxnum + 1)) maxnum=$((maxnum + 1))
done done
echo $maxnum echo $maxnum
exit 0 exit 0

View File

@ -19,7 +19,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -14,7 +14,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -15,7 +15,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

View File

@ -13,7 +13,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to> # Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by

Some files were not shown because too many files have changed in this diff Show More