Upgrading pleroma

This commit is contained in:
Bob Mottram 2017-04-17 12:35:35 +01:00
parent bc878af6bb
commit 631a35d62e
1 changed files with 7 additions and 1 deletions

View File

@ -270,14 +270,20 @@ function upgrade_pleroma {
echo 'Unable to build pleroma'
exit 268362
fi
if [ -f /var/www/${domain_name}/htdocs/static/logo.png ]; then
cp /var/www/${domain_name}/htdocs/static/logo.png /var/www/${domain_name}/htdocs/static/logo.png.old
fi
if [ -f /var/www/${domain_name}/htdocs/static/config.json ]; then
cp /var/www/${domain_name}/htdocs/static/config.json /var/www/${domain_name}/htdocs/static/config.json.old
fi
cp -r $INSTALL_DIR/pleroma/dist/* /var/www/${domain_name}/htdocs/
pleroma_set_background_image_from_url "$domain_name" "$background_url" "$title"
if [ -f /var/www/${domain_name}/htdocs/static/config.json.old ]; then
mv /var/www/${domain_name}/htdocs/static/config.json.old /var/www/${domain_name}/htdocs/static/config.json
fi
sed -i "s|\"name\":.*|\"name\": \"${title}\",|g" /var/www/${domain_name}/htdocs/static/config.json
if [ -f /var/www/${domain_name}/htdocs/static/logo.png.old ]; then
cp /var/www/${domain_name}/htdocs/static/logo.png.old /var/www/${domain_name}/htdocs/static/logo.png
fi
if [ -f /var/www/${domain_name}/htdocs/index.php ]; then
mv /var/www/${domain_name}/htdocs/index.php /var/www/${domain_name}/htdocs/index_qvitter.php