Avoid carriage return
This commit is contained in:
parent
0406b5543d
commit
d6d00373bc
|
@ -8294,7 +8294,7 @@ function install_mariadb {
|
||||||
get_mariadb_password
|
get_mariadb_password
|
||||||
if [ ! $MARIADB_PASSWORD ]; then
|
if [ ! $MARIADB_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
MARIADB_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
MARIADB_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
MARIADB_PASSWORD="$(openssl rand -base64 32)"
|
MARIADB_PASSWORD="$(openssl rand -base64 32)"
|
||||||
fi
|
fi
|
||||||
|
@ -8554,7 +8554,7 @@ function install_owncloud {
|
||||||
get_mariadb_owncloud_admin_password
|
get_mariadb_owncloud_admin_password
|
||||||
if [ ! $OWNCLOUD_ADMIN_PASSWORD ]; then
|
if [ ! $OWNCLOUD_ADMIN_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
OWNCLOUD_ADMIN_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
OWNCLOUD_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
OWNCLOUD_ADMIN_PASSWORD="$(openssl rand -base64 32)"
|
OWNCLOUD_ADMIN_PASSWORD="$(openssl rand -base64 32)"
|
||||||
fi
|
fi
|
||||||
|
@ -8813,7 +8813,7 @@ function install_gogs {
|
||||||
get_mariadb_git_admin_password
|
get_mariadb_git_admin_password
|
||||||
if [ ! $GIT_ADMIN_PASSWORD ]; then
|
if [ ! $GIT_ADMIN_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
GIT_ADMIN_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
GIT_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
GIT_ADMIN_PASSWORD="$(openssl rand -base64 32)"
|
GIT_ADMIN_PASSWORD="$(openssl rand -base64 32)"
|
||||||
fi
|
fi
|
||||||
|
@ -9255,7 +9255,7 @@ function install_xmpp {
|
||||||
|
|
||||||
if ! grep -q "Your XMPP password is" /home/$MY_USERNAME/README; then
|
if ! grep -q "Your XMPP password is" /home/$MY_USERNAME/README; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
XMPP_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
XMPP_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
XMPP_PASSWORD="$(openssl rand -base64 8)"
|
XMPP_PASSWORD="$(openssl rand -base64 8)"
|
||||||
fi
|
fi
|
||||||
|
@ -9341,7 +9341,7 @@ function install_irc_server {
|
||||||
sed -i 's/;CloakHost = cloaked.host/CloakHost = freedombone/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_SALT="$(openssl rand -base64 32)"
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
IRC_OPERATOR_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
IRC_OPERATOR_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
IRC_OPERATOR_PASSWORD="$(openssl rand -base64 8)"
|
IRC_OPERATOR_PASSWORD="$(openssl rand -base64 8)"
|
||||||
fi
|
fi
|
||||||
|
@ -9468,7 +9468,7 @@ function install_wiki {
|
||||||
get_wiki_admin_password
|
get_wiki_admin_password
|
||||||
if [ ! $WIKI_ADMIN_PASSWORD ]; then
|
if [ ! $WIKI_ADMIN_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
WIKI_ADMIN_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
WIKI_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
WIKI_ADMIN_PASSWORD="$(openssl rand -base64 16)"
|
WIKI_ADMIN_PASSWORD="$(openssl rand -base64 16)"
|
||||||
fi
|
fi
|
||||||
|
@ -9908,7 +9908,7 @@ function install_blog {
|
||||||
get_blog_admin_password
|
get_blog_admin_password
|
||||||
if [ ! $FULLBLOG_ADMIN_PASSWORD ]; then
|
if [ ! $FULLBLOG_ADMIN_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
FULLBLOG_ADMIN_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
FULLBLOG_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
FULLBLOG_ADMIN_PASSWORD="$(openssl rand -base64 16)"
|
FULLBLOG_ADMIN_PASSWORD="$(openssl rand -base64 16)"
|
||||||
fi
|
fi
|
||||||
|
@ -9984,7 +9984,7 @@ function install_gnu_social {
|
||||||
get_mariadb_gnusocial_admin_password
|
get_mariadb_gnusocial_admin_password
|
||||||
if [ ! $MICROBLOG_ADMIN_PASSWORD ]; then
|
if [ ! $MICROBLOG_ADMIN_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
MICROBLOG_ADMIN_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
MICROBLOG_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
MICROBLOG_ADMIN_PASSWORD="$(openssl rand -base64 32)"
|
MICROBLOG_ADMIN_PASSWORD="$(openssl rand -base64 32)"
|
||||||
fi
|
fi
|
||||||
|
@ -10263,7 +10263,7 @@ function install_hubzilla {
|
||||||
get_mariadb_hubzilla_admin_password
|
get_mariadb_hubzilla_admin_password
|
||||||
if [ ! $HUBZILLA_ADMIN_PASSWORD ]; then
|
if [ ! $HUBZILLA_ADMIN_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
HUBZILLA_ADMIN_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
HUBZILLA_ADMIN_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
HUBZILLA_ADMIN_PASSWORD="$(openssl rand -base64 32)"
|
HUBZILLA_ADMIN_PASSWORD="$(openssl rand -base64 32)"
|
||||||
fi
|
fi
|
||||||
|
@ -11312,7 +11312,7 @@ function install_voip {
|
||||||
get_voip_server_password
|
get_voip_server_password
|
||||||
if [ ! $VOIP_SERVER_PASSWORD ]; then
|
if [ ! $VOIP_SERVER_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
VOIP_SERVER_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
VOIP_SERVER_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
VOIP_SERVER_PASSWORD="$(openssl rand -base64 16)"
|
VOIP_SERVER_PASSWORD="$(openssl rand -base64 16)"
|
||||||
if [ ${#VOIP_SERVER_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
if [ ${#VOIP_SERVER_PASSWORD} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
||||||
|
@ -11403,7 +11403,7 @@ function install_sip {
|
||||||
get_sip_server_password
|
get_sip_server_password
|
||||||
if [ ! $SIP_SERVER_PASSWORD ]; then
|
if [ ! $SIP_SERVER_PASSWORD ]; then
|
||||||
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
if [ -f $IMAGE_PASSWORD_FILE ]; then
|
||||||
SIP_SERVER_PASSWORD="$(cat $IMAGE_PASSWORD_FILE)"
|
SIP_SERVER_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
|
||||||
else
|
else
|
||||||
SIP_SERVER_PASSWORD="$(openssl rand -base64 10)"
|
SIP_SERVER_PASSWORD="$(openssl rand -base64 10)"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -222,7 +222,7 @@ EOF
|
||||||
if [ -f ~/.initial_setup ]; then
|
if [ -f ~/.initial_setup ]; then
|
||||||
EOF
|
EOF
|
||||||
echo ' if [ -f ~/login.txt ]; then' >> $rootdir/root/.bashrc
|
echo ' if [ -f ~/login.txt ]; then' >> $rootdir/root/.bashrc
|
||||||
echo ' NEW_USER_PASSWORD=$(cat ~/login.txt)' >> $rootdir/root/.bashrc
|
echo ' NEW_USER_PASSWORD=$(printf `cat ~/login.txt`)' >> $rootdir/root/.bashrc
|
||||||
echo ' else' >> $rootdir/root/.bashrc
|
echo ' else' >> $rootdir/root/.bashrc
|
||||||
echo ' ENTROPY=$(cat /proc/sys/kernel/random/entropy_avail)' >> $rootdir/root/.bashrc
|
echo ' ENTROPY=$(cat /proc/sys/kernel/random/entropy_avail)' >> $rootdir/root/.bashrc
|
||||||
echo ' if [ $ENTROPY -lt 500]; then' >> $rootdir/root/.bashrc
|
echo ' if [ $ENTROPY -lt 500]; then' >> $rootdir/root/.bashrc
|
||||||
|
@ -240,7 +240,7 @@ EOF
|
||||||
EOF
|
EOF
|
||||||
# change the password for the admin user
|
# change the password for the admin user
|
||||||
echo -n " echo \"${MY_USERNAME}:" >> $rootdir/root/.bashrc
|
echo -n " echo \"${MY_USERNAME}:" >> $rootdir/root/.bashrc
|
||||||
echo -n '$(cat ~/login.txt)"|chpasswd' >> $rootdir/root/.bashrc
|
echo -n '$(printf `cat ~/login.txt`)"|chpasswd' >> $rootdir/root/.bashrc
|
||||||
|
|
||||||
# Remove the initial setup files
|
# Remove the initial setup files
|
||||||
echo " rm /root/.initial_setup" >> $rootdir/root/.bashrc
|
echo " rm /root/.initial_setup" >> $rootdir/root/.bashrc
|
||||||
|
|
Loading…
Reference in New Issue