Mailpile upgrades

This commit is contained in:
Bob Mottram 2017-05-13 17:32:17 +01:00
parent c945b7d402
commit cddc4639f3
1 changed files with 16 additions and 4 deletions

View File

@ -37,7 +37,7 @@ MAILPILE_DOMAIN_NAME=
MAILPILE_CODE=
MAILPILE_ONION_PORT=8103
MAILPILE_REPO="https://github.com/mailpile/Mailpile"
MAILPILE_COMMIT='cfd1749a2d073be2903ce947c7cbf59b1e237448'
MAILPILE_COMMIT='6f56fe4ad736c8e385bea658454bed110d08c60d'
MAILPILE_PORT=33411
mailpile_variables=(MAILPILE_REPO
@ -83,12 +83,24 @@ function reconfigure_mailpile {
function upgrade_mailpile {
read_config_param "MAILPILE_DOMAIN_NAME"
upgrade_mp=
CURR_COMMIT=$MAILPILE_COMMIT
if grep -q "mailpile commit" $COMPLETION_FILE; then
CURR_COMMIT=$(get_completion_param "mailpile commit")
fi
if [[ "$CURR_COMMIT" != "$MAILPILE_COMMIT" ]]; then
upgrade_mp=1
fi
function_check set_repo_commit
set_repo_commit /var/www/$MAILPILE_DOMAIN_NAME/mail "mailpile commit" "$MAILPILE_COMMIT" $MAILPILE_REPO
cd /var/www/$MAILPILE_DOMAIN_NAME/mail
pip install -r requirements.txt
chown -R mailpile:mailpile /var/www/$MAILPILE_DOMAIN_NAME/mail
if [ $upgrade_mp ]; then
cd /var/www/$MAILPILE_DOMAIN_NAME/mail
pip install -r requirements.txt
chown -R mailpile:mailpile /var/www/$MAILPILE_DOMAIN_NAME/mail
fi
}
function backup_local_mailpile {