1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vikunja_ynh.git synced 2024-09-03 18:06:26 +02:00
vikunja_ynh/scripts/change_url
Éric Gaspar b978b23c87 cleaning
2024-08-31 09:04:32 +02:00

48 lines
1.5 KiB
Bash

#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
secret=$(ynh_string_random --length=32)
timezone="$(cat /etc/timezone)"
redis_db=$(ynh_redis_get_free_db)
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression "Stopping $app's systemd service..."
ynh_systemctl --service=$app --action=stop --log_path="systemd"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression "Updating NGINX web server configuration..."
ynh_config_change_url_nginx
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration..."
domain="$new_domain"
path="$new_path"
ynh_config_add --template="config.yml" --destination="$install_dir/config.yml"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression "Starting $app's systemd service..."
ynh_systemctl --service=$app --action=start --log_path=systemd
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Change of URL completed for $app"