Deprecate supplying a password for bdsmail

This commit is contained in:
Bob Mottram 2018-02-13 19:55:21 +00:00
parent 1e4c768b31
commit 2fa207e124
1 changed files with 2 additions and 24 deletions

View File

@ -97,7 +97,7 @@ function add_user_bdsmail {
fi
sed -i "s|username|$new_username|g" /home/$new_username/.mutt/bdsmail
bdsmail_configure_users
$BDSMAIL_DIR/bin/newmail $BDSMAIL_DIR/config.ini $new_username /home/$new_username/Maildir/i2p "$new_user_password"
$BDSMAIL_DIR/bin/newmail $BDSMAIL_DIR/config.ini $new_username /home/$new_username/Maildir/i2p
chown -R $new_username:$new_username /home/$new_username/.mutt
echo '0'
}
@ -255,27 +255,6 @@ function install_bdsmail {
remove_bdsmail
fi
# ask to the ssh login password for the admin user
# This is then used to create the maildir account
user_account_password=''
data=$(tempfile 2>/dev/null)
trap "rm -f $data" 0 1 2 5 15
dialog --title $"Password" \
--clear \
--passwordbox $"Enter your ssh login password.\n\nThis is the same as the original ssh login password shown when you first installed the system." 12 60 2> $data
ret=$?
case $ret in
0)
user_account_password=$(cat $data)
;;
esac
if [ ${#user_account_password} -lt 2 ]; then
echo ''
echo $'A password must be provided for your user account.'
exit 3656358
fi
if [ -d /repos/bdsmail ]; then
mkdir $BDSMAIL_DIR
cp -r -p /repos/bdsmail/. $BDSMAIL_DIR
@ -420,8 +399,7 @@ function install_bdsmail {
bdsmail_configure_users
$BDSMAIL_DIR/bin/newmail $BDSMAIL_DIR/config.ini $MY_USERNAME /home/$MY_USERNAME/Maildir/i2p "$user_account_password"
user_account_password=
$BDSMAIL_DIR/bin/newmail $BDSMAIL_DIR/config.ini $MY_USERNAME /home/$MY_USERNAME/Maildir/i2p
APP_INSTALLED=1
}