diff --git a/scripts/install b/scripts/install index c96f525..25bf89a 100644 --- a/scripts/install +++ b/scripts/install @@ -162,8 +162,7 @@ then # Look for installed and supported CardDAV servers for carddav_app in "nextcloud" "baikal" do - carddav_app_id=$(yunohost app list --installed -f $carddav_app \ - --output-as json | grep -Po '"id":[ ]?"\K.*?(?=")' | head -1) + carddav_app_id=$(yunohost app list | grep "id: $carddav_app" | grep -Po 'id: \K(.*)' | head -n 1) if [ -n "$carddav_app_id" ] then carddav_server=1 @@ -172,8 +171,8 @@ then carddav_path=$(ynh_app_setting_get --app=$carddav_app_id --key=path) carddav_url="https://${carddav_domain}${carddav_path%/}" ynh_replace_string --match_string="{${carddav_app}_url}" --replace_string="$carddav_url" --target_file="$carddav_tmp_config" - ynh_replace_string --match_string="/* PRESET FOR: $carddav_app" --replace_string="" --target_file="$carddav_tmp_config" - ynh_replace_string --match_string="END: $carddav_app */" --replace_string="" --target_file="$carddav_tmp_config" + ynh_replace_string --match_string="\/\* PRESET FOR: $carddav_app" --replace_string="" --target_file="$carddav_tmp_config" + ynh_replace_string --match_string="END: $carddav_app \*\/" --replace_string="" --target_file="$carddav_tmp_config" fi done diff --git a/scripts/upgrade b/scripts/upgrade index d58c79a..d0f9342 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -209,8 +209,7 @@ then # Look for installed and supported CardDAV servers for carddav_app in "nextcloud" "baikal" do - carddav_app_id=$(yunohost app list --installed -f $carddav_app \ - --output-as json | grep -Po '"id":[ ]?"\K.*?(?=")' | head -1) + carddav_app_id=$(yunohost app list | grep "id: $carddav_app" | grep -Po 'id: \K(.*)' | head -n 1) if [ -n "$carddav_app_id" ] then carddav_server=1