From fbbb8fd691278d216f6029c455cf4512450812ef Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 1 Jul 2015 19:28:24 +0100 Subject: [PATCH] Quotes --- src/freedombone | 24 ++++++++++++------------ src/freedombone-splitkey | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/freedombone b/src/freedombone index a8e09602..e943fea8 100755 --- a/src/freedombone +++ b/src/freedombone @@ -6769,7 +6769,7 @@ function install_mariadb { get_mariadb_password if [ ! $MARIADB_PASSWORD ]; then - MARIADB_PASSWORD=$(openssl rand -base64 32) + MARIADB_PASSWORD="$(openssl rand -base64 32)" echo "$MARIADB_PASSWORD" > $DATABASE_PASSWORD_FILE chmod 600 $DATABASE_PASSWORD_FILE @@ -7016,7 +7016,7 @@ function install_owncloud { get_mariadb_owncloud_admin_password if [ ! $OWNCLOUD_ADMIN_PASSWORD ]; then - OWNCLOUD_ADMIN_PASSWORD=$(openssl rand -base64 32) + OWNCLOUD_ADMIN_PASSWORD="$(openssl rand -base64 32)" fi if ! grep -q "Owncloud database user" /home/$MY_USERNAME/README; then @@ -7264,7 +7264,7 @@ function install_gogs { get_mariadb_git_admin_password if [ ! $GIT_ADMIN_PASSWORD ]; then - GIT_ADMIN_PASSWORD=$(openssl rand -base64 32) + GIT_ADMIN_PASSWORD="$(openssl rand -base64 32)" fi if ! grep -q "Gogs admin user password" /home/$MY_USERNAME/README; then @@ -7505,7 +7505,7 @@ function install_xmpp { touch /home/$MY_USERNAME/README if ! grep -q "Your XMPP password is" /home/$MY_USERNAME/README; then - XMPP_PASSWORD=$(openssl rand -base64 8) + XMPP_PASSWORD="$(openssl rand -base64 8)" prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME $XMPP_PASSWORD echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README @@ -7575,8 +7575,8 @@ function install_irc_server { sed -i 's/;MaxUsers = 23/MaxUsers = 23/g' /etc/ngircd/ngircd.conf sed -i 's|;KeyFile = /etc/ngircd/#chan.key|KeyFile = /etc/ngircd/#freedombone.key|g' /etc/ngircd/ngircd.conf sed -i 's/;CloakHost = cloaked.host/CloakHost = freedombone/g' /etc/ngircd/ngircd.conf - IRC_SALT=$(openssl rand -base64 32) - IRC_OPERATOR_PASSWORD=$(openssl rand -base64 8) + IRC_SALT="$(openssl rand -base64 32)" + IRC_OPERATOR_PASSWORD="$(openssl rand -base64 8)" sed -i "s|;CloakHostSalt = abcdefghijklmnopqrstuvwxyz|CloakHostSalt = $IRC_SALT|g" /etc/ngircd/ngircd.conf sed -i 's/;ConnectIPv4 = yes/ConnectIPv4 = yes/g' /etc/ngircd/ngircd.conf sed -i 's/;MorePrivacy = no/MorePrivacy = yes/g' /etc/ngircd/ngircd.conf @@ -7684,7 +7684,7 @@ function install_wiki { get_wiki_admin_password if [ ! $WIKI_ADMIN_PASSWORD ]; then - WIKI_ADMIN_PASSWORD=$(openssl rand -base64 16) + WIKI_ADMIN_PASSWORD="$(openssl rand -base64 16)" fi HASHED_WIKI_PASSWORD=$(echo -n "$WIKI_ADMIN_PASSWORD" | md5sum | awk -F ' ' '{print $1}') echo -n "$MY_USERNAME:$HASHED_WIKI_PASSWORD:$MY_NAME:$MY_EMAIL:admin,user,upload" > /var/lib/dokuwiki/acl/users.auth.php @@ -8117,7 +8117,7 @@ function install_blog { # create a user password get_blog_admin_password if [ ! $FULLBLOG_ADMIN_PASSWORD ]; then - FULLBLOG_ADMIN_PASSWORD=$(openssl rand -base64 16) + FULLBLOG_ADMIN_PASSWORD="$(openssl rand -base64 16)" echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README echo 'HTMLy Blog' >> /home/$MY_USERNAME/README @@ -8187,7 +8187,7 @@ function install_gnu_social { get_mariadb_gnusocial_admin_password if [ ! $MICROBLOG_ADMIN_PASSWORD ]; then - MICROBLOG_ADMIN_PASSWORD=$(openssl rand -base64 32) + MICROBLOG_ADMIN_PASSWORD="$(openssl rand -base64 32)" echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README echo 'GNU Social' >> /home/$MY_USERNAME/README @@ -8430,7 +8430,7 @@ function install_redmatrix { get_mariadb_redmatrix_admin_password if [ ! $REDMATRIX_ADMIN_PASSWORD ]; then - REDMATRIX_ADMIN_PASSWORD=$(openssl rand -base64 32) + REDMATRIX_ADMIN_PASSWORD="$(openssl rand -base64 32)" echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README echo 'Red Matrix' >> /home/$MY_USERNAME/README @@ -9283,10 +9283,10 @@ function install_voip { get_voip_server_password if [ ! $VOIP_SERVER_PASSWORD ]; then - VOIP_SERVER_PASSWORD=$(openssl rand -base64 16) + VOIP_SERVER_PASSWORD="$(openssl rand -base64 16)" fi if [ ${#VOIP_SERVER_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then - VOIP_SERVER_PASSWORD=$(openssl rand -base64 16) + VOIP_SERVER_PASSWORD="$(openssl rand -base64 16)" fi # Make an ssl cert for the server diff --git a/src/freedombone-splitkey b/src/freedombone-splitkey index 5b95e7f6..30cc11f8 100755 --- a/src/freedombone-splitkey +++ b/src/freedombone-splitkey @@ -120,7 +120,7 @@ shred -zu /home/$MY_USERNAME/pubkey.txt # generate a random passphrase if one isn't supplied if [ ! $PASSPHRASE ]; then - PASSPHRASE=$(openssl rand -base64 64) + PASSPHRASE="$(openssl rand -base64 100)" fi # encrypt the keys file with a passphrase