upgrades of bdsmail

This commit is contained in:
Bob Mottram 2018-02-13 15:31:50 +00:00
parent a8fdb02085
commit 6e4a9ba84d
1 changed files with 9 additions and 3 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 $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 "$new_user_password"
chown -R $new_username:$new_username /home/$new_username/.mutt
echo '0'
}
@ -125,7 +125,10 @@ function upgrade_bdsmail {
# update to the next commit
set_repo_commit $BDSMAIL_DIR "bdsmail commit" "$BDSMAIL_COMMIT" $BDSMAIL_REPO
cd $BDSMAIL_DIR
make GOROOT=/home/go/go${GO_VERSION}
chown -R i2psvc:i2psvc $BDSMAIL_DIR
systemctl restart bdsmail
}
function backup_local_bdsmail {
@ -288,6 +291,9 @@ function install_bdsmail {
git checkout $BDSMAIL_COMMIT -b $BDSMAIL_COMMIT
set_completion_param "bdsmail commit" "$BDSMAIL_COMMIT"
mkdir -p $BDSMAIL_DIR/Maildir/i2p
chmod -R 700 $BDSMAIL_DIR/Maildir
make GOROOT=/home/go/go${GO_VERSION}
if [ ! -f $BDSMAIL_DIR/bin/bdsconfig ]; then
echo $'Unable to make bdsmail'
@ -305,7 +311,7 @@ function install_bdsmail {
echo "bindmail = 127.0.0.1:$I2P_SMTP_PORT" >> $BDSMAIL_DIR/config.ini
echo 'bindweb = 127.0.0.1:8489' >> $BDSMAIL_DIR/config.ini
echo 'domain = localhost' >> $BDSMAIL_DIR/config.ini
echo 'maildir = mail' >> $BDSMAIL_DIR/config.ini
echo 'maildir = Maildir/i2p' >> $BDSMAIL_DIR/config.ini
echo 'database = localhost.sqlite' >> $BDSMAIL_DIR/config.ini
echo 'assets = contrib/assets/web' >> $BDSMAIL_DIR/config.ini
@ -390,7 +396,7 @@ function install_bdsmail {
bdsmail_configure_users
$BDSMAIL_DIR/bin/newmail $MY_USERNAME /home/$MY_USERNAME/MailDir/i2p "$user_account_password"
$BDSMAIL_DIR/bin/newmail $BDSMAIL_DIR/config.ini $MY_USERNAME /home/$MY_USERNAME/Maildir/i2p "$user_account_password"
user_account_password=
APP_INSTALLED=1