Upgrading gnusocial

This commit is contained in:
Bob Mottram 2017-06-12 22:40:33 +01:00
parent 5e92fa6bea
commit 8809a82ea2
1 changed files with 8 additions and 1 deletions

View File

@ -339,6 +339,11 @@ function configure_interactive_gnusocial {
}
function upgrade_gnusocial {
CURR_GNUSOCIAL_COMMIT=$(get_completion_param "gnusocial commit")
if [[ "$CURR_GNUSOCIAL_COMMIT" == "$GNUSOCIAL_COMMIT" ]]; then
return
fi
if grep -q "gnusocial domain" $COMPLETION_FILE; then
GNUSOCIAL_DOMAIN_NAME=$(get_completion_param "gnusocial domain")
fi
@ -364,7 +369,9 @@ function upgrade_gnusocial {
gnusocial_block_domain_script gnusocial $GNUSOCIAL_DOMAIN_NAME
gnusocial_hourly_script gnusocial $GNUSOCIAL_DOMAIN_NAME
upgrade_pleroma "$GNUSOCIAL_DOMAIN_NAME" "gnusocial" "$GNUSOCIAL_BACKGROUND_IMAGE_URL" "$GNUSOCIAL_TITLE"
if [ -d $INSTALL_DIR/pleroma ]; then
upgrade_pleroma "$GNUSOCIAL_DOMAIN_NAME" "gnusocial" "$GNUSOCIAL_BACKGROUND_IMAGE_URL" "$GNUSOCIAL_TITLE"
fi
install_gnusocial_default_background "gnusocial" "$GNUSOCIAL_DOMAIN_NAME"
chown -R www-data:www-data /var/www/${GNUSOCIAL_DOMAIN_NAME}/htdocs
}