mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
57 lines
2 KiB
Bash
57 lines
2 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC STARTING
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# STANDARD MODIFICATIONS
|
|
#=================================================
|
|
# STOP SYSTEMD SERVICE
|
|
#=================================================
|
|
ynh_script_progression --message="Stopping a systemd service..."
|
|
|
|
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
|
|
|
|
#=================================================
|
|
# MODIFY URL IN NGINX CONF
|
|
#=================================================
|
|
ynh_script_progression --message="Updating NGINX web server configuration..."
|
|
|
|
ynh_change_url_nginx_config
|
|
|
|
#=================================================
|
|
# SPECIFIC MODIFICATIONS
|
|
#=================================================
|
|
# MODIFY URL IN .ENV
|
|
#=================================================
|
|
ynh_script_progression --message="Updating .env configuration..."
|
|
|
|
ynh_backup_if_checksum_is_different --file="$install_dir/.env"
|
|
ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$install_dir/.env"
|
|
ynh_store_file_checksum --file="$install_dir/.env"
|
|
|
|
#=================================================
|
|
# GENERIC FINALISATION
|
|
#=================================================
|
|
# START SYSTEMD SERVICE
|
|
#=================================================
|
|
ynh_script_progression --message="Starting a systemd service..."
|
|
|
|
# Start a systemd service
|
|
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Started Wekan, task board"
|
|
|
|
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
|
|
sleep 60
|
|
fi
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app"
|