From 44d3247e1eec766ec9f341be199d5cdf06363704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 18 Jan 2024 12:16:42 +0100 Subject: [PATCH] Add change_url script --- scripts/change_url | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 scripts/change_url diff --git a/scripts/change_url b/scripts/change_url new file mode 100644 index 0000000..a26554e --- /dev/null +++ b/scripts/change_url @@ -0,0 +1,35 @@ +#!/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 + +#================================================= +# SPECIFIC MODIFICATIONS +#================================================= +# ... +#================================================= +ynh_script_progression --message="Updating a configuration file..." --weight=1 + +ynh_add_config --template="../conf/hosts.xml" --destination="$install_dir/store/conf/hosts.xml" + +chmod -R o-rwx "$install_dir" +chown -R "$app:www-data" "$install_dir" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Change of URL completed for $app" --last