mirror of
https://github.com/YunoHost-Apps/baikal_ynh.git
synced 2024-09-03 18:16:11 +02:00
* 0.9.3 * Auto-update README * Update baikal.yaml * Php (#74) * set php * Fix * Update upgrade * Auto-update README * cleaning * Update manifest.json * Auto-update README * Update manifest.json * Update upgrade * remove old link * Auto-update README * Update nginx.conf * Update upgrade * fix * Auto-update README * Update upgrade * Update check_process * Update manifest.json * Auto-update README * Update baikal.yaml * Update upgrade (#83) * Version 2 (#79) * v2 * v2 * fix * Update manifest.toml * fix * Auto-update README * fix * Auto-update README * Update manifest.toml * Update manifest.toml * Update manifest.toml * Update upgrade * cleaning * Update manifest.toml * Update upgrade * Auto-update README * Update manifest.toml * Auto-update README * Update install --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> * cleaning * Auto-update README * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org>
51 lines
1.8 KiB
Bash
51 lines
1.8 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# CHECK IF THE APP CAN BE MOVED WITH THESE ARGS
|
|
#=================================================
|
|
|
|
if [ $change_domain -eq 1 ]
|
|
then
|
|
# Check if .well-known is available for the new domain.
|
|
if is_url_handled --domain="$new_domain" --path="/.well-known/caldav" || is_url_handled --domain="$new_domain" --path="/.well-known/carddav"
|
|
then
|
|
ynh_die --message="Another app already uses the domain $new_domain to serve a calDAV/cardDAV feature. Please use another domain."
|
|
fi
|
|
fi
|
|
|
|
#=================================================
|
|
# STANDARD MODIFICATIONS
|
|
#=================================================
|
|
# MODIFY URL IN NGINX CONF
|
|
#=================================================
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
|
|
|
|
ynh_change_url_nginx_config
|
|
|
|
#=================================================
|
|
# SPECIFIC MODIFICATIONS
|
|
#=================================================
|
|
# UPDATE CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Updating $app configuration..." --weight=2
|
|
|
|
ynh_backup_if_checksum_is_different --file="$install_dir/config/baikal.yaml"
|
|
|
|
ynh_replace_string --match_string="base_uri: '$old_path'" --replace_string="base_uri: '$new_path'" --target_file="$install_dir/config/baikal.yaml"
|
|
|
|
ynh_store_file_checksum --file="$install_dir/config/baikal.yaml"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|