Browse Source

Project name

jessie
Bob Mottram 6 years ago
parent
commit
b028a8c009
  1. 80
      src/freedombone
  2. 6
      src/freedombone-addcert
  3. 2
      src/freedombone-addemail
  4. 2
      src/freedombone-addlist
  5. 2
      src/freedombone-addsipuser
  6. 18
      src/freedombone-adduser
  7. 2
      src/freedombone-addxmpp
  8. 2
      src/freedombone-client
  9. 4
      src/freedombone-clientcert
  10. 8
      src/freedombone-config
  11. 38
      src/freedombone-controlpanel
  12. 2
      src/freedombone-deploy
  13. 2
      src/freedombone-ignore
  14. 2
      src/freedombone-image
  15. 8
      src/freedombone-keydrive
  16. 2
      src/freedombone-mesh
  17. 2
      src/freedombone-meshweb
  18. 2
      src/freedombone-recoverkey
  19. 2
      src/freedombone-remote
  20. 8
      src/freedombone-renew-cert
  21. 2
      src/freedombone-rmemail
  22. 2
      src/freedombone-rmlist
  23. 2
      src/freedombone-rmsipuser
  24. 6
      src/freedombone-rmuser
  25. 2
      src/freedombone-rmxmpp
  26. 2
      src/freedombone-splitkey
  27. 2
      src/freedombone-unignore
  28. 2
      src/freedombone-xmpp-pass
  29. 6
      src/zeronetavahi

80
src/freedombone

@ -252,7 +252,7 @@ USB_DRIVE=/dev/sda1
USB_MOUNT=/mnt/usb
# name of a script used to upgrade the system
UPGRADE_SCRIPT_NAME="freedombone-upgrade"
UPGRADE_SCRIPT_NAME="${PROJECT_NAME}-upgrade"
# name of a script which keeps running processes going even if they crash
WATCHDOG_SCRIPT_NAME="keepon"
@ -314,7 +314,7 @@ CPULIMIT='/usr/bin/cpulimit -l 20 -e'
CREATE_GIT_PROJECT_COMMAND='create-project'
# File which keeps track of what has already been installed
COMPLETION_FILE=$HOME/freedombone-completed.txt
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
# Used to indicate whether the backup contains MariaDB databases or not
BACKUP_INCLUDES_DATABASES="no"
@ -538,17 +538,17 @@ function interactive_configuration_remote_backups {
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return
fi
if [ ! -f /usr/local/bin/freedombone-remote ]; then
if [ ! -f /usr/bin/freedombone-remote ]; then
echo 'The command freedombone-remote was not found'
if [ ! -f /usr/local/bin/${PROJECT_NAME}-remote ]; then
if [ ! -f /usr/bin/${PROJECT_NAME}-remote ]; then
echo $"The command ${PROJECT_NAME}-remote was not found"
exit 87354
fi
fi
freedombone-remote -u $MY_USERNAME -l $FRIENDS_SERVERS_LIST -m $MINIMUM_PASSWORD_LENGTH -r yes
${PROJECT_NAME}-remote -u $MY_USERNAME -l $FRIENDS_SERVERS_LIST -m $MINIMUM_PASSWORD_LENGTH -r yes
if [ ! "$?" = "0" ]; then
echo $'Command failed:'
echo ''
echo $" freedombone-remote -u $MY_USERNAME -l $FRIENDS_SERVERS_LIST -m $MINIMUM_PASSWORD_LENGTH -r yes"
echo $" ${PROJECT_NAME}-remote -u $MY_USERNAME -l $FRIENDS_SERVERS_LIST -m $MINIMUM_PASSWORD_LENGTH -r yes"
echo ''
exit 65892
fi
@ -560,17 +560,17 @@ function validate_domain_name {
dots=${TEST_DOMAIN_NAME//[^.]}
no_of_dots=${#dots}
if (( $no_of_dots > 3 )); then
TEST_DOMAIN_NAME="The domain $TEST_DOMAIN_NAME has too many subdomains. It should be of the type w.x.y.z, x.y.z or y.z"
TEST_DOMAIN_NAME=$"The domain $TEST_DOMAIN_NAME has too many subdomains. It should be of the type w.x.y.z, x.y.z or y.z"
fi
if (( $no_of_dots == 0 )); then
TEST_DOMAIN_NAME="The domain $TEST_DOMAIN_NAME has no top level domain. It should be of the type w.x.y.z, x.y.z or y.z"
TEST_DOMAIN_NAME=$"The domain $TEST_DOMAIN_NAME has no top level domain. It should be of the type w.x.y.z, x.y.z or y.z"
fi
}
function interactive_configuration {
if [ ! -f /usr/local/bin/freedombone-config ]; then
if [ ! -f /usr/bin/freedombone-config ]; then
echo 'The command freedombone-config was not found'
if [ ! -f /usr/local/bin/${PROJECT_NAME}-config ]; then
if [ ! -f /usr/bin/${PROJECT_NAME}-config ]; then
echo $"The command ${PROJECT_NAME}-config was not found"
exit 63935
fi
fi
@ -579,13 +579,13 @@ function interactive_configuration {
fi
if [[ $MINIMAL_INSTALL == "no" ]]; then
freedombone-config \
${PROJECT_NAME}-config \
-f $CONFIGURATION_FILE \
-w $FREEDOMBONE_WEBSITE \
-b $FREEDOMBONE_BITMESSAGE \
-m $MINIMUM_PASSWORD_LENGTH
else
freedombone-config \
${PROJECT_NAME}-config \
-f $CONFIGURATION_FILE \
-w $FREEDOMBONE_WEBSITE \
-b $FREEDOMBONE_BITMESSAGE \
@ -600,7 +600,7 @@ function interactive_configuration {
if [ ! "$?" = "0" ]; then
echo $'Command failed:'
echo ''
echo $" freedombone-config -u $MY_USERNAME -f $CONFIGURATION_FILE -w $FREEDOMBONE_WEBSITE -b $FREEDOMBONE_BITMESSAGE -m $MINIMUM_PASSWORD_LENGTH --minimal [yes|no]"
echo $" ${PROJECT_NAME}-config -u $MY_USERNAME -f $CONFIGURATION_FILE -w $FREEDOMBONE_WEBSITE -b $FREEDOMBONE_BITMESSAGE -m $MINIMUM_PASSWORD_LENGTH --minimal [yes|no]"
echo ''
exit 73594
fi
@ -3957,7 +3957,7 @@ function configure_email {
# make a tls certificate for email
if [ ! -f /etc/ssl/certs/exim.dhparam ]; then
freedombone-addcert -h exim --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h exim --dhkey $DH_KEYLENGTH
check_certificates exim
fi
cp /etc/ssl/private/exim.key /etc/exim4
@ -4221,7 +4221,7 @@ function configure_imap {
fi
if [ ! -f /etc/ssl/certs/dovecot.dhparam ]; then
freedombone-addcert -h dovecot --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h dovecot --dhkey $DH_KEYLENGTH
check_certificates dovecot
fi
chown root:dovecot /etc/ssl/certs/dovecot.*
@ -4317,9 +4317,9 @@ function configure_imap_client_certs {
# make a CA cert
if [ ! -f /etc/ssl/private/ca-$DEFAULT_DOMAIN_NAME.key ]; then
if [[ $LETSENCRYPT_ENABLED != "yes" ]]; then
freedombone-addcert -h $DEFAULT_DOMAIN_NAME --ca "" --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h $DEFAULT_DOMAIN_NAME --ca "" --dhkey $DH_KEYLENGTH
else
freedombone-addcert -e $DEFAULT_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $DEFAULT_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
fi
fi
# CA configuration
@ -4364,7 +4364,7 @@ function configure_imap_client_certs {
fi
touch /etc/ssl/ssldb
echo 0001 > /etc/ssl/sslserial
#freedombone-clientcert -u $MY_USERNAME
#${PROJECT_NAME}-clientcert -u $MY_USERNAME
service dovecot restart
echo 'configure_imap_client_certs' >> $COMPLETION_FILE
}
@ -5212,7 +5212,7 @@ function create_public_mailing_list {
chmod 600 /home/$MY_USERNAME/README
fi
freedombone-addlist -u $MY_USERNAME -l "$PUBLIC_MAILING_LIST" -s "$PUBLIC_MAILING_LIST"
${PROJECT_NAME}-addlist -u $MY_USERNAME -l "$PUBLIC_MAILING_LIST" -s "$PUBLIC_MAILING_LIST"
echo 'create_public_mailing_list' >> $COMPLETION_FILE
}
@ -5249,7 +5249,7 @@ function create_private_mailing_list {
sed -i 's/#smtp_port: 25/smtp_port: 465/g' /etc/schleuder/schleuder.conf
sed -i 's/#superadminaddr: root@localhost/superadminaddr: root@localhost' /etc/schleuder/schleuder.conf
schleuder-newlist $PRIVATE_MAILING_LIST@$DEFAULT_DOMAIN_NAME -realname "$PRIVATE_MAILING_LIST" -adminaddress $MY_EMAIL_ADDRESS -initmember $MY_EMAIL_ADDRESS -initmemberkey $MY_GPG_PUBLIC_KEY -nointeractive
freedombone-addemail -u $MY_USERNAME -e $PRIVATE_MAILING_LIST@$DEFAULT_DOMAIN_NAME -l $PRIVATE_MAILING_LIST
${PROJECT_NAME}-addemail -u $MY_USERNAME -e $PRIVATE_MAILING_LIST@$DEFAULT_DOMAIN_NAME -l $PRIVATE_MAILING_LIST
echo 'schleuder:' > /etc/exim4/conf.d/router/550_exim4-config_schleuder
echo ' debug_print = "R: schleuder for $local_part@$domain"' >> /etc/exim4/conf.d/router/550_exim4-config_schleuder
@ -5282,7 +5282,7 @@ function split_gpg_key_into_fragments {
# split the gpg key into fragments if social key management is enabled
if [[ $ENABLE_SOCIAL_KEY_MANAGEMENT == "yes" ]]; then
echo 'Splitting GPG key. You may need to enter your passphrase.'
freedombone-splitkey -u $MY_USERNAME -e $MY_EMAIL_ADDRESS --fullname "$MY_NAME"
${PROJECT_NAME}-splitkey -u $MY_USERNAME -e $MY_EMAIL_ADDRESS --fullname "$MY_NAME"
if [ ! -d /home/$MY_USERNAME/.gnupg_fragments ]; then
echo 'Yhe GPG key could not be split'
exit 86548
@ -5942,9 +5942,9 @@ quit" > $INSTALL_DIR/batch.sql
if [ ! -f /etc/ssl/certs/$OWNCLOUD_DOMAIN_NAME.dhparam ]; then
if [[ $LETSENCRYPT_ENABLED != "yes" ]]; then
freedombone-addcert -h $OWNCLOUD_DOMAIN_NAME --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h $OWNCLOUD_DOMAIN_NAME --dhkey $DH_KEYLENGTH
else
freedombone-addcert -e $OWNCLOUD_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $OWNCLOUD_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
fi
check_certificates $OWNCLOUD_DOMAIN_NAME
fi
@ -6226,9 +6226,9 @@ quit" > $INSTALL_DIR/batch.sql
if [ ! -f /etc/ssl/certs/$GIT_DOMAIN_NAME.dhparam ]; then
if [[ $LETSENCRYPT_ENABLED != "yes" ]]; then
freedombone-addcert -h $GIT_DOMAIN_NAME --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h $GIT_DOMAIN_NAME --dhkey $DH_KEYLENGTH
else
freedombone-addcert -e $GIT_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $GIT_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
fi
check_certificates $GIT_DOMAIN_NAME
fi
@ -6515,7 +6515,7 @@ function install_xmpp {
fi
if [ ! -f /etc/ssl/certs/xmpp.dhparam ]; then
freedombone-addcert -h xmpp --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h xmpp --dhkey $DH_KEYLENGTH
check_certificates xmpp
fi
chown prosody:prosody /etc/ssl/private/xmpp.key
@ -6649,7 +6649,7 @@ function install_irc_server {
fi
if [ ! -f /etc/ssl/certs/ngircd.dhparam ]; then
freedombone-addcert -h ngircd --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h ngircd --dhkey $DH_KEYLENGTH
check_certificates ngircd
fi
@ -6760,9 +6760,9 @@ function install_wiki {
fi
if [ ! -f /etc/ssl/certs/$WIKI_DOMAIN_NAME.dhparam ]; then
if [[ $LETSENCRYPT_ENABLED != "yes" ]]; then
freedombone-addcert -h $WIKI_DOMAIN_NAME --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h $WIKI_DOMAIN_NAME --dhkey $DH_KEYLENGTH
else
freedombone-addcert -e $WIKI_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $WIKI_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
fi
check_certificates $WIKI_DOMAIN_NAME
fi
@ -7083,9 +7083,9 @@ function install_blog {
if [ ! -f /etc/ssl/certs/$FULLBLOG_DOMAIN_NAME.dhparam ]; then
if [[ $LETSENCRYPT_ENABLED != "yes" ]]; then
freedombone-addcert -h $FULLBLOG_DOMAIN_NAME --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h $FULLBLOG_DOMAIN_NAME --dhkey $DH_KEYLENGTH
else
freedombone-addcert -e $FULLBLOG_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $FULLBLOG_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
fi
check_certificates $FULLBLOG_DOMAIN_NAME
fi
@ -7492,9 +7492,9 @@ quit" > $INSTALL_DIR/batch.sql
if [ ! -f /etc/ssl/certs/$MICROBLOG_DOMAIN_NAME.dhparam ]; then
if [[ $LETSENCRYPT_ENABLED != "yes" ]]; then
freedombone-addcert -h $MICROBLOG_DOMAIN_NAME --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h $MICROBLOG_DOMAIN_NAME --dhkey $DH_KEYLENGTH
else
freedombone-addcert -e $MICROBLOG_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $MICROBLOG_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
fi
check_certificates $MICROBLOG_DOMAIN_NAME
fi
@ -7799,9 +7799,9 @@ quit" > $INSTALL_DIR/batch.sql
if [ ! -f /etc/ssl/certs/$HUBZILLA_DOMAIN_NAME.dhparam ]; then
if [[ $LETSENCRYPT_ENABLED != "yes" ]]; then
freedombone-addcert -h $HUBZILLA_DOMAIN_NAME --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h $HUBZILLA_DOMAIN_NAME --dhkey $DH_KEYLENGTH
else
freedombone-addcert -e $HUBZILLA_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $HUBZILLA_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
fi
check_certificates $HUBZILLA_DOMAIN_NAME
fi
@ -8128,9 +8128,9 @@ function install_mediagoblin {
if [ ! -f /etc/ssl/certs/$MEDIAGOBLIN_DOMAIN_NAME.dhparam ]; then
if [[ $LETSENCRYPT_ENABLED != "yes" ]]; then
freedombone-addcert -h $MEDIAGOBLIN_DOMAIN_NAME --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h $MEDIAGOBLIN_DOMAIN_NAME --dhkey $DH_KEYLENGTH
else
freedombone-addcert -e $MEDIAGOBLIN_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $MEDIAGOBLIN_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
fi
check_certificates $MEDIAGOBLIN_DOMAIN_NAME
fi
@ -8658,7 +8658,7 @@ function install_voip {
# Make an ssl cert for the server
if [ ! -f /etc/ssl/certs/mumble.dhparam ]; then
freedombone-addcert -h mumble --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -h mumble --dhkey $DH_KEYLENGTH
check_certificates mumble
fi

6
src/freedombone-addcert

@ -49,7 +49,7 @@ LETSENCRYPT_REPO='https://github.com/letsencrypt/letsencrypt'
function show_help {
echo ''
echo $'freedombone-addcert -h [hostname] -c [country code] -a [area] -l [location]'
echo $"${PROJECT_NAME}-addcert -h [hostname] -c [country code] -a [area] -l [location]"
echo $' -o [organisation] -u [unit] --ca "" --nodh ""'
echo ''
echo $'Creates a self-signed certificate for the given hostname'
@ -233,7 +233,7 @@ if [ -f /etc/init.d/nginx ]; then
fi
# Create a bundle of your certificates
cat /etc/ssl/mycerts/*.crt /etc/ssl/mycerts/*.pem > /etc/ssl/freedombone-bundle.crt
tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt /etc/ssl/mycerts/*.pem
cat /etc/ssl/mycerts/*.crt /etc/ssl/mycerts/*.pem > /etc/ssl/${PROJECT_NAME}-bundle.crt
tar -czvf /etc/ssl/${PROJECT_NAME}-certs.tar.gz /etc/ssl/mycerts/*.crt /etc/ssl/mycerts/*.pem
exit 0

2
src/freedombone-addemail

@ -40,7 +40,7 @@ GROUP_NAME=
function show_help {
echo ''
echo $'freedombone-addemail -u [username] -e [email address] -g [group name]'
echo $"${PROJECT_NAME}-addemail -u [username] -e [email address] -g [group name]"
echo ''
exit 0
}

2
src/freedombone-addlist

@ -41,7 +41,7 @@ LIST_ADDRESS=
function show_help {
echo ''
echo $'freedombone-addlist -u [username] -l [mailing list name] -s [subject tag] -e [list email address]'
echo $"${PROJECT_NAME}-addlist -u [username] -l [mailing list name] -s [subject tag] -e [list email address]"
echo ''
exit 0
}

2
src/freedombone-addsipuser

@ -42,7 +42,7 @@ USER_EXISTS="no"
function show_help {
echo ''
echo $'freedombone-addsipuser -u [username] -e [extension] -p [password]'
echo $"${PROJECT_NAME}-addsipuser -u [username] -e [extension] -p [password]"
echo ''
exit 0
}

18
src/freedombone-adduser

@ -38,7 +38,7 @@ MY_USERNAME=$1
SSH_PUBLIC_KEY="$2"
GPG_KEYSERVER='hkp://keys.gnupg.net'
SSH_PORT=2222
COMPLETION_FILE=$HOME/freedombone-completed.txt
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
SIP_EXTENSION=
FULLBLOG_DOMAIN_NAME=
@ -187,7 +187,7 @@ chmod 600 /home/$MY_USERNAME/README
if grep -q "install_xmpp" $COMPLETION_FILE; then
echo $"Adding an XMPP account for $MY_USERNAME"
freedombone-addxmpp -e "$MY_USERNAME@$HOSTNAME" -p "$NEW_USER_PASSWORD"
${PROJECT_NAME}-addxmpp -e "$MY_USERNAME@$HOSTNAME" -p "$NEW_USER_PASSWORD"
if [ ! "$?" = "0" ]; then
echo $"XMPP account not created"
userdel -r $MY_USERNAME
@ -200,7 +200,7 @@ if grep -q "Blog domain" $COMPLETION_FILE; then
if [ ! -d /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/config/users ]; then
echo $'Blog users directory not found'
if grep -q "install_xmpp" $COMPLETION_FILE; then
freedombone-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
${PROJECT_NAME}-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
fi
userdel -r $MY_USERNAME
exit 9
@ -214,12 +214,12 @@ if grep -q "Blog domain" $COMPLETION_FILE; then
fi
if grep -q "install_sip" $COMPLETION_FILE; then
SIP_EXTENSION=$(freedombone-sipfreeext)
freedombone-addsipuser -u $MY_USERNAME -e $SIP_EXTENSION -p "$NEW_USER_PASSWORD"
SIP_EXTENSION=$(${PROJECT_NAME}-sipfreeext)
${PROJECT_NAME}-addsipuser -u $MY_USERNAME -e $SIP_EXTENSION -p "$NEW_USER_PASSWORD"
if [ ! "$?" = "0" ]; then
echo $'SIP user could not be added. Ensure that extension numbers are in order and do no exceed 299'
if grep -q "install_xmpp" $COMPLETION_FILE; then
freedombone-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
${PROJECT_NAME}-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
fi
if grep -q "Blog domain" $COMPLETION_FILE; then
if [ -f /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/config/users/$MY_USERNAME.ini ]; then
@ -237,7 +237,7 @@ fi
# if [ ! "$?" = "0" ]; then
# echo 'Owncloud user could not be added'
# if grep -q "install_xmpp" $COMPLETION_FILE; then
# freedombone-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
# ${PROJECT_NAME}-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
# fi
# if grep -q "Blog domain" $COMPLETION_FILE; then
# if [ -f /var/www/$FULLBLOG_DOMAIN_NAME/htdocs/config/users/$MY_USERNAME.ini ]; then
@ -245,7 +245,7 @@ fi
# fi
# fi
# if grep -q "install_sip" $COMPLETION_FILE; then
# freedombone-rmsipuser $MY_USERNAME
# ${PROJECT_NAME}-rmsipuser $MY_USERNAME
# fi
# userdel -r $MY_USERNAME
# export OC_PASS=""
@ -269,7 +269,7 @@ echo $"They can download their GPG keys with:"
echo ''
echo " scp -P $SSH_PORT -r $MY_USERNAME@$HOSTNAME:/home/$MY_USERNAME/.gnupg ~/"
echo ''
echo $'They should also run freedombone-client on their system to ensure'
echo $"They should also run ${PROJECT_NAME}-client on their system to ensure"
echo $'the best security.'
exit 0

2
src/freedombone-addxmpp

@ -39,7 +39,7 @@ NEW_USER_PASSWORD=
function show_help {
echo ''
echo $'freedombone-addxmpp -e [email address] -p [password]'
echo $"${PROJECT_NAME}-addxmpp -e [email address] -p [password]"
echo ''
exit 0
}

2
src/freedombone-client

@ -477,7 +477,7 @@ function mesh_batman {
function show_help {
echo ''
echo $'freedombone-client'
echo $"${PROJECT_NAME}-client"
echo ''
exit 0
}

4
src/freedombone-clientcert

@ -47,7 +47,7 @@ EXTENSIONS=""
function show_help {
echo ''
echo $'freedombone-clientcert -u [username]'
echo $"${PROJECT_NAME}-clientcert -u [username]"
echo ''
echo $'Creates email certificates for use with IMAP clients'
echo ''
@ -103,7 +103,7 @@ fi
chmod 600 /etc/dovecot/passwd-file
# create a user cert
freedombone-addcert -h $USERNAME --nodh ""
${PROJECT_NAME}-addcert -h $USERNAME --nodh ""
if [ ! -f /etc/ssl/private/$USERNAME.key ]; then
echo $'User certificates were not created'

8
src/freedombone-config

@ -112,7 +112,7 @@ DEFAULT_LANGUAGE='en_GB.UTF-8'
function show_help {
echo ''
echo $'freedombone-config -f [config filename] -m [min password length]'
echo $"${PROJECT_NAME}-config -f [config filename] -m [min password length]"
echo ''
echo $'Creates an inventory of remote backup locations'
echo ''
@ -289,7 +289,7 @@ function interactive_gpg_from_remote {
REMOTE_SERVERS_LIST=/home/$MY_USERNAME/keyshareservers.txt
# get a list of remote servers
freedombone-remote -u $MY_USERNAME -l $REMOTE_SERVERS_LIST -t "Remote server"
${PROJECT_NAME}-remote -u $MY_USERNAME -l $REMOTE_SERVERS_LIST -t "Remote server"
if [ ! -f $REMOTE_SERVERS_LIST ]; then
dialog --title $"Encryption keys" --msgbox $'Error obtaining server list' 6 70
@ -306,7 +306,7 @@ function interactive_gpg_from_remote {
# try to recover the key from the servers
apt-get -y install libgfshare-bin gnupg
freedombone-recoverkey -u $MY_USERNAME -l $REMOTE_SERVERS_LIST
${PROJECT_NAME}-recoverkey -u $MY_USERNAME -l $REMOTE_SERVERS_LIST
if [ ! "$?" = "0" ]; then
dialog --title $"Encryption keys" --msgbox $'Your key could not be recovered' 6 70
return 3
@ -667,7 +667,7 @@ function interactive_configuration {
#fi
if [[ $SYSTEM_TYPE == "$VARIANT_MESH_USER" ]]; then
freedombone-client --essid $ESSID --channel $WIFI_CHANNEL
${PROJECT_NAME}-client --essid $ESSID --channel $WIFI_CHANNEL
if [ "$?" = "0" ]; then
clear
echo ".---. . . "

38
src/freedombone-controlpanel

@ -33,7 +33,7 @@ PROJECT_NAME='freedombone'
export TEXTDOMAIN=${PROJECT_NAME}-controlpanel
export TEXTDOMAINDIR="/usr/share/locale"
COMPLETION_FILE=$HOME/freedombone-completed.txt
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
SELECTED_USERNAME=
SIP_CONFIG_FILE=/etc/sipwitch.conf
ADMIN_USER=
@ -85,12 +85,12 @@ function add_user {
fi
if [ ${#new_user_ssh_public_key} -lt 20 ]; then
clear
freedombone-adduser "$new_user_username"
${PROJECT_NAME}-adduser "$new_user_username"
any_key
else
if [[ "$new_user_ssh_public_key" == "ssh-"* ]]; then
clear
freedombone-adduser "$new_user_username" "$new_user_ssh_public_key"
${PROJECT_NAME}-adduser "$new_user_username" "$new_user_ssh_public_key"
any_key
else
dialog --title $"ssh public key" \
@ -153,7 +153,7 @@ function delete_user {
return
fi
clear
freedombone-rmuser $SELECTED_USERNAME
${PROJECT_NAME}-rmuser $SELECTED_USERNAME
any_key
}
@ -173,7 +173,7 @@ function configure_remote_backups {
--msgbox $"Home directory not found" 6 40
return
fi
freedombone-remote -u $ADMIN_USER
${PROJECT_NAME}-remote -u $ADMIN_USER
}
function change_password {
@ -291,7 +291,7 @@ function add_to_mailing_list {
return
fi
freedombone-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
${PROJECT_NAME}-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
-s "$LIST_SUBJECT" -e "$LIST_EMAIL"
dialog --title $"Add mailing list" \
--msgbox $"$LIST_NAME list was added" 6 40
@ -334,7 +334,7 @@ function email_rule {
return
fi
freedombone-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
${PROJECT_NAME}-addemail -u $SELECTED_USERNAME -e "$RULE_EMAIL" \
-g "$RULE_FOLDER"
dialog --title $"Add email rule" \
--msgbox $"Email rule for $RULE_EMAIL was added" 6 40
@ -372,11 +372,11 @@ function block_unblock_email {
return
fi
if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
freedombone-ignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
${PROJECT_NAME}-ignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
dialog --title $"Block an email" \
--msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME blocked" 6 40
else
freedombone-unignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
${PROJECT_NAME}-unignore -u $SELECTED_USERNAME -e "$BLOCK_EMAIL"
dialog --title $"Unblock an email" \
--msgbox "Email from $BLOCK_EMAIL to $SELECTED_USERNAME unblocked" 6 40
fi
@ -409,11 +409,11 @@ function block_unblock_subject {
return
fi
if [[ $BLOCK == "y"* || $BLOCK == "Y"* ]]; then
freedombone-ignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
${PROJECT_NAME}-ignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
dialog --title $"Block an email" \
--msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME blocked" 6 40
else
freedombone-unignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
${PROJECT_NAME}-unignore -u $SELECTED_USERNAME -t "$BLOCK_SUBJECT"
dialog --title $"Unblock an email" \
--msgbox "Email with subject $BLOCK_SUBJECT to $SELECTED_USERNAME unblocked" 6 40
fi
@ -427,7 +427,7 @@ function create_keydrive_master {
dialog --title $"USB Master Keydrive" \
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
clear
freedombone-keydrive -u $SELECTED_USERNAME --master 'yes'
${PROJECT_NAME}-keydrive -u $SELECTED_USERNAME --master 'yes'
any_key
}
@ -439,7 +439,7 @@ function create_keydrive_fragment {
dialog --title $"USB Fragment Keydrive" \
--msgbox $"Plug in a LUKS encrypted USB drive" 6 40
clear
freedombone-keydrive -u $SELECTED_USERNAME
${PROJECT_NAME}-keydrive -u $SELECTED_USERNAME
any_key
}
@ -510,9 +510,9 @@ function logging_on_off {
echo ''
echo $'This may take a few seconds. Please wait...'
if [[ $logging == "no" ]]; then
freedombone-logging off
${PROJECT_NAME}-logging off
else
freedombone-logging on
${PROJECT_NAME}-logging on
fi
}
@ -525,12 +525,12 @@ function restore_gpg_key {
dialog --title "$restorestr $SELECTED_USERNAME" \
--msgbox $"Plug in your USB keydrive" 6 40
clear
freedombone-recoverkey -u $SELECTED_USERNAME
${PROJECT_NAME}-recoverkey -u $SELECTED_USERNAME
any_key
}
function security_settings {
freedombone-sec
${PROJECT_NAME}-sec
any_key
}
@ -559,7 +559,7 @@ function hubzilla_renew_cert {
--msgbox $"Hubzilla install directory not found" 6 40
return
fi
freedombone-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
${PROJECT_NAME}-renew-cert -h $HUBZILLA_DOMAIN_NAME -p 'letsencrypt'
if [ ! "$?" = "0" ]; then
any_key
else
@ -655,7 +655,7 @@ function format_drive {
esac
clear
freedombone-format $drive
${PROJECT_NAME}-format $drive
any_key
}

2
src/freedombone-deploy

@ -157,7 +157,7 @@ if [ -d /home/$MY_USERNAME ]; then
fi
get_passwords_from_readme /home/$DEFAULT_IMAGE_USERNAME/README
#freedombone-adduser $MY_USERNAME > ~/setup.txt
#${PROJECT_NAME}-adduser $MY_USERNAME > ~/setup.txt
#set_admin_user
#create_backup_gpg_key
#regenerate_ssh_host_keys

2
src/freedombone-ignore

@ -41,7 +41,7 @@ SUBJECT_TEXT=
function show_help {
echo ''
echo $'freedombone-ignore -u [username] -e [mail address] -t [text in subject line]'
echo $"${PROJECT_NAME}-ignore -u [username] -e [mail address] -t [text in subject line]"
echo ''
exit 0
}

2
src/freedombone-image

@ -167,7 +167,7 @@ shift
done
if [[ $INTERACTIVE == "yes" || $INTERACTIVE == "y" || $INTERACTIVE == "Yes" ]]; then
freedombone-config --minimal "$MINIMAL_INSTALL"
${PROJECT_NAME}-config --minimal "$MINIMAL_INSTALL"
if [ -f freedombone.cfg ]; then
CONFIG_FILENAME=freedombone.cfg
DEFAULT_DOMAIN_NAME=$(cat $CONFIG_FILENAME | grep 'DEFAULT_DOMAIN_NAME' | awk -F '=' '{print $2}')

8
src/freedombone-keydrive

@ -43,7 +43,7 @@ FORMAT="no"
function show_help {
echo ''
echo $'freedombone-keydrive -u [username] -d [device, eg. sdb] --master [yes/no] -n [no of fragments] --format [yes/no]'
echo $"${PROJECT_NAME}-keydrive -u [username] -d [device, eg. sdb] --master [yes/no] -n [no of fragments] --format [yes/no]"
echo ''
exit 0
}
@ -109,7 +109,7 @@ cryptsetup luksClose encrypted_usb
# optionally format the drive
if [[ $FORMAT == "yes" ]]; then
freedombone-format ${USB_DRIVE::-1}
${PROJECT_NAME}-format ${USB_DRIVE::-1}
if [ ! "$?" = "0" ]; then
exit 36823
fi
@ -190,7 +190,7 @@ fi
LOCAL_FRAGMENTS_DIR=/home/$MY_USERNAME/.gnupg_fragments
if [ ! -d $LOCAL_FRAGMENTS_DIR ]; then
freedombone-splitkey -u $MY_USERNAME -n $KEY_FRAGMENTS
${PROJECT_NAME}-splitkey -u $MY_USERNAME -n $KEY_FRAGMENTS
fi
cd $LOCAL_FRAGMENTS_DIR
@ -199,7 +199,7 @@ if [ ! "$?" = "0" ]; then
no_of_local_shares=0
fi
if (( no_of_local_shares < 3 )); then
freedombone-splitkey -u $MY_USERNAME -n $KEY_FRAGMENTS
${PROJECT_NAME}-splitkey -u $MY_USERNAME -n $KEY_FRAGMENTS
cd $LOCAL_FRAGMENTS_DIR
no_of_local_shares=$(ls -afq keyshare.asc.* | wc -l)
if [ ! "$?" = "0" ]; then

2
src/freedombone-mesh

@ -232,7 +232,7 @@ fi
if [[ $SERVER_INSTALLATION == "no" ]]; then
if [ ! -f /usr/bin/batman ]; then
freedombone-client
${PROJECT_NAME}-client
fi
fi

2
src/freedombone-meshweb

@ -341,7 +341,7 @@ fi
if [[ $SERVER_INSTALLATION == "no" ]]; then
if [ ! -f /usr/bin/batman ]; then
freedombone-client
${PROJECT_NAME}-client
fi
fi

2
src/freedombone-recoverkey

@ -39,7 +39,7 @@ GPG_USB_DRIVE='sdb1'
function show_help {
echo ''
echo $'freedombone-recoverkey -u [username] -d [drive]'
echo $"${PROJECT_NAME}-recoverkey -u [username] -d [drive]"
echo $' -l [friends servers list filename]'
echo ''
exit 0

2
src/freedombone-remote

@ -57,7 +57,7 @@ RECIPROCAL="no"
function show_help {
echo ''
echo $'freedombone-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 $'Creates an inventory of remote backup locations'
echo ''

8
src/freedombone-renew-cert

@ -40,7 +40,7 @@ LETSENCRYPT_SERVER='https://acme-v01.api.letsencrypt.org/directory'
function show_help {
echo ''
echo $'freedombone-renew-cert -h [hostname] -p [provider]'
echo $"${PROJECT_NAME}-renew-cert -h [hostname] -p [provider]"
echo ''
echo $'Makes it easier to renew a ssl/tls certificate for a website'
echo ''
@ -54,7 +54,7 @@ function show_help {
function renew_letsencrypt {
if [ ! -f /etc/letsencrypt/live/${HOSTNAME}/fullchain.pem ]; then
echo $"Adding Let's Encrypt certificate"
freedombone-addcert -e $HOSTNAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
${PROJECT_NAME}-addcert -e $HOSTNAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
if [ ! "$?" = "0" ]; then
echo $"Unable to add Let's encrypt certificate"
exit 6328
@ -113,8 +113,8 @@ function renew_startssl {
# add it to mycerts
cp /etc/ssl/certs/$HOSTNAME.bundle.crt /etc/ssl/mycerts
cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
cat /etc/ssl/mycerts/*.crt > /etc/ssl/${PROJECT_NAME}-bundle.crt
tar -czvf /etc/ssl/${PROJECT_NAME}-certs.tar.gz /etc/ssl/mycerts/*.crt
# create backups
if [ ! -d /etc/ssl/backups ]; then

2
src/freedombone-rmemail

@ -38,7 +38,7 @@ MYUSERNAME=$USER
function show_help {
echo ''
echo $'freedombone-rmemail -u [username] -e [email address]'
echo $"${PROJECT_NAME}-rmemail -u [username] -e [email address]"
echo ''
exit 0
}

2
src/freedombone-rmlist

@ -40,7 +40,7 @@ LIST_ADDRESS=
function show_help {
echo ''
echo $'freedombone-rmlist -u [username] -l [mailing list name] -e [list email address]'
echo $"${PROJECT_NAME}-rmlist -u [username] -l [mailing list name] -e [list email address]"
echo ''
exit 0
}

2
src/freedombone-rmsipuser

@ -40,7 +40,7 @@ USER_EXISTS="no"
function show_help {
echo ''
echo $'freedombone-rmsipuser [username]'
echo $"${PROJECT_NAME}-rmsipuser [username]"
echo ''
exit 0
}

6
src/freedombone-rmuser

@ -6,7 +6,7 @@ export TEXTDOMAIN=${PROJECT_NAME}-rmuser
export TEXTDOMAINDIR="/usr/share/locale"
MY_USERNAME=$1
COMPLETION_FILE=$HOME/freedombone-completed.txt
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
if [ ! $MY_USERNAME ]; then
echo $'Please specify a username to remove'
@ -47,7 +47,7 @@ if [[ $yn != 'y' && $yn != 'Y' && $yn != 'yes' && $yn != 'Yes' && $yn != 'YES' ]
fi
if grep -q "install_xmpp" $COMPLETION_FILE; then
freedombone-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
${PROJECT_NAME}-rmxmpp -e "$MY_USERNAME@$HOSTNAME"
fi
if grep -q "Blog domain" $COMPLETION_FILE; then
@ -58,7 +58,7 @@ if grep -q "Blog domain" $COMPLETION_FILE; then
fi
if grep -q "install_sip" $COMPLETION_FILE; then
freedombone-rmsipuser $MY_USERNAME
${PROJECT_NAME}-rmsipuser $MY_USERNAME
fi
#if grep -q "install_owncloud" $COMPLETION_FILE; then

2
src/freedombone-rmxmpp

@ -38,7 +38,7 @@ EMAIL_ADDRESS=
function show_help {
echo ''
echo $'freedombone-rmxmpp -e [email address]'
echo $"${PROJECT_NAME}-rmxmpp -e [email address]"
echo ''
exit 0
}

2
src/freedombone-splitkey

@ -46,7 +46,7 @@ MY_NAME=
function show_help {
echo ''
echo $'freedombone-splitkey -u [username] -n [number of fragments] -e [email address] --fullname [Full name]'
echo $"${PROJECT_NAME}-splitkey -u [username] -n [number of fragments] -e [email address] --fullname [Full name]"
echo ''
exit 0
}

2
src/freedombone-unignore

@ -41,7 +41,7 @@ SUBJECT_TEXT=
function show_help {
echo ''
echo $'freedombone-unignore -u [username] -e [mail address] -t [text in subject line]'
echo $"${PROJECT_NAME}-unignore -u [username] -e [mail address] -t [text in subject line]"
echo ''
exit 0
}

2
src/freedombone-xmpp-pass

@ -38,7 +38,7 @@ EMAIL_ADDRESS=
function show_help {
echo ''
echo $'freedombone-xmpp-pass -e [email address]'
echo $"${PROJECT_NAME}-xmpp-pass -e [email address]"
echo ''
exit 0
}

6
src/zeronetavahi

@ -50,9 +50,9 @@ if [ ! -d $ZERONET_INSTALL ]; then
fi
fi
BLOGS_FILE=$ZERONET_INSTALL/freedombone-blogs
FORUM_FILE=$ZERONET_INSTALL/freedombone-fora
TOX_USERS_FILE=$ZERONET_INSTALL/freedombone-tox-users
BLOGS_FILE=$ZERONET_INSTALL/${PROJECT_NAME}-blogs
FORUM_FILE=$ZERONET_INSTALL/${PROJECT_NAME}-fora
TOX_USERS_FILE=$ZERONET_INSTALL/${PROJECT_NAME}-tox-users
ZERONET_INDEX=/home/$MY_USERNAME/mesh.html
ZERONET_CONFIG=$ZERONET_INSTALL/bootstrap

Loading…
Cancel
Save