mirror of
https://github.com/YunoHost-Apps/phpservermon_ynh.git
synced 2024-09-03 19:56:40 +02:00
35 lines
1.2 KiB
Bash
35 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# MODIFY URL IN NGINX CONF
|
|
#=================================================
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
|
|
|
ynh_change_url_nginx_config
|
|
|
|
#=================================================
|
|
# Update Config file
|
|
#=================================================
|
|
|
|
if [ "$change_path" -eq 1 ]; then
|
|
# Update config file
|
|
ynh_replace_string --match_string="'PSM_BASE_URL', '.*'" --replace_string="'PSM_BASE_URL', '$path'" --target_file="$install_dir/config.php"
|
|
#replace checksum
|
|
ynh_delete_file_checksum --file="$install_dir/config.php"
|
|
ynh_store_file_checksum --file="$install_dir/config.php"
|
|
fi
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|