Only if custom image is present
This commit is contained in:
parent
d724d433fc
commit
9ce9d5dae4
|
@ -52,12 +52,12 @@ function qvitter_update_background {
|
|||
if [ -d /var/www/${domain_name}/htdocs/local/plugins/Qvitter/img ]; then
|
||||
if [ -f bg_custom.${ext} ]; then
|
||||
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 'sitebackground' /var/www/${domain_name}/htdocs/config.php; then
|
||||
sed -i '/sitebackground/d' /var/www/${domain_name}/htdocs/config.php
|
||||
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
|
||||
sed -i '/sitebackground/d' /var/www/${domain_name}/htdocs/config.php
|
||||
fi
|
||||
echo "\$config['site']['qvitter']['sitebackground'] = 'img/bg_custom.${ext}';" >> /var/www/${domain_name}/htdocs/config.php
|
||||
fi
|
||||
echo "\$config['site']['qvitter']['sitebackground'] = 'img/bg_custom.${ext}';" >> /var/www/${domain_name}/htdocs/config.php
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue