mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
[fix] Retrieve proper CardDAV app_id and fix unknown continue command
This commit is contained in:
parent
53e7356e0b
commit
4e7e497c07
1 changed files with 10 additions and 9 deletions
|
@ -106,17 +106,18 @@ install_carddav() {
|
||||||
|
|
||||||
# Look for installed and supported CardDAV servers
|
# Look for installed and supported CardDAV servers
|
||||||
for carddav_app in "owncloud" "baikal"; do
|
for carddav_app in "owncloud" "baikal"; do
|
||||||
sudo yunohost app list --installed -f "$carddav_app" | grep -q id \
|
local app_id=$(sudo yunohost app list --installed --output-as plain \
|
||||||
|| continue
|
-f "$carddav_app" | ynh_get_plain_key '#id' | head -1)
|
||||||
|
[[ -z "$app_id" ]] || {
|
||||||
# Retrieve app settings and enable relevant preset
|
# Retrieve app settings and enable relevant preset
|
||||||
carddav_domain=$(ynh_app_setting_get "$carddav_app" domain)
|
carddav_domain=$(ynh_app_setting_get "$app_id" domain)
|
||||||
carddav_path=$(ynh_app_setting_get "$carddav_app" path)
|
carddav_path=$(ynh_app_setting_get "$app_id" path)
|
||||||
carddav_url="https://${carddav_domain}${carddav_path%/}"
|
carddav_url="https://${carddav_domain}${carddav_path%/}"
|
||||||
sed -i "s#{${carddav_app}_url}#${carddav_url}#g" "$carddav_tmp_config"
|
sed -i "s#{${carddav_app}_url}#${carddav_url}#g" "$carddav_tmp_config"
|
||||||
sed -i \
|
sed -i \
|
||||||
"/\/\/\/\/ PRESET FOR: ${carddav_app}/\
|
"/\/\/\/\/ PRESET FOR: ${carddav_app}/\
|
||||||
,/\/\/\/\/ END: ${carddav_app}/s/^\/\///" "$carddav_tmp_config"
|
,/\/\/\/\/ END: ${carddav_app}/s/^\/\///" "$carddav_tmp_config"
|
||||||
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy plugin the configuration file
|
# Copy plugin the configuration file
|
||||||
|
|
Loading…
Reference in a new issue