mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2024-11-21 18:41:35 +01:00
42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# STOP SYSTEMD SERVICE
|
|
#=================================================
|
|
ynh_script_progression "Stopping $app's systemd service..."
|
|
|
|
ynh_systemctl --service="$app" --action=stop
|
|
|
|
#=================================================
|
|
# MODIFY URL IN NGINX CONF
|
|
#=================================================
|
|
ynh_script_progression "Updating NGINX web server configuration..."
|
|
|
|
ynh_config_change_url_nginx
|
|
|
|
#=================================================
|
|
# SPECIFIC MODIFICATIONS
|
|
#=================================================
|
|
# Setup gitea.ini
|
|
#=================================================
|
|
ynh_script_progression "Updating gitea configuration..."
|
|
|
|
ynh_config_add --template="app.ini" --destination="$install_dir/custom/conf/app.ini"
|
|
_set_permissions
|
|
|
|
#=================================================
|
|
# START SYSTEMD SERVICE
|
|
#=================================================
|
|
ynh_script_progression "Starting gitea services..."
|
|
|
|
ynh_systemctl --service="$app" --action=start --log_path="/var/log/$app/gitea.log" --wait_until="$systemd_match_start_line"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression "Change of URL completed for $app"
|