From a347a2c90977b17c110ae337f401e8c6258bb741 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Sun, 11 Jul 2021 16:30:40 +0200 Subject: [PATCH] Fix: Remove error messages --- scripts/upgrade | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e27c328..34b46dc 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -244,13 +244,20 @@ if [ -n $(ynh_app_setting_get --app="$app" --key=port) ]; then fi # If old service exsits; remove it -if [ $(cat /etc/yunohost/services.yml | grep "$app:") -eq "$app" ]; then +if [ -n $(cat /etc/yunohost/services.yml | grep "$app:") ]; then yunohost service remove "$app" fi # Remove old config scripts -ynh_secure_remove --file="/etc/yunohost/apps/$app/config_panel.toml" -ynh_secure_remove --file="/etc/yunohost/apps/$app/scripts/config" +if [ -e "/etc/yunohost/apps/$app/config_panel.toml" ]; then +{ + ynh_secure_remove --file="/etc/yunohost/apps/$app/config_panel.toml" +} + +if [ -e "/etc/yunohost/apps/$app/scripts/config" ]; then +{ + ynh_secure_remove --file="/etc/yunohost/apps/$app/scripts/config" +} # Remove old dependencies if [[ ! $standalone ]];