Only if custom image is present

This commit is contained in:
Bob Mottram 2017-06-18 13:35:24 +01:00
parent d724d433fc
commit 9ce9d5dae4
1 changed files with 5 additions and 5 deletions

View File

@ -52,7 +52,6 @@ function qvitter_update_background {
if [ -d /var/www/${domain_name}/htdocs/local/plugins/Qvitter/img ]; then if [ -d /var/www/${domain_name}/htdocs/local/plugins/Qvitter/img ]; then
if [ -f bg_custom.${ext} ]; then if [ -f bg_custom.${ext} ]; then
cp bg_custom.${ext} /var/www/${domain_name}/htdocs/local/plugins/Qvitter/img cp bg_custom.${ext} /var/www/${domain_name}/htdocs/local/plugins/Qvitter/img
fi
if ! grep -q "bg_custom.${ext}" /var/www/${domain_name}/htdocs/config.php; then if ! grep -q "bg_custom.${ext}" /var/www/${domain_name}/htdocs/config.php; then
if grep -q 'sitebackground' /var/www/${domain_name}/htdocs/config.php; then if grep -q 'sitebackground' /var/www/${domain_name}/htdocs/config.php; then
sed -i '/sitebackground/d' /var/www/${domain_name}/htdocs/config.php sed -i '/sitebackground/d' /var/www/${domain_name}/htdocs/config.php
@ -60,6 +59,7 @@ function qvitter_update_background {
echo "\$config['site']['qvitter']['sitebackground'] = 'img/bg_custom.${ext}';" >> /var/www/${domain_name}/htdocs/config.php echo "\$config['site']['qvitter']['sitebackground'] = 'img/bg_custom.${ext}';" >> /var/www/${domain_name}/htdocs/config.php
fi fi
fi fi
fi
} }
function pleroma_set_background_image_from_url { function pleroma_set_background_image_from_url {