2018-02-25 21:45:24 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
2023-09-09 11:17:52 +02:00
|
|
|
# GENERIC STARTING
|
2018-02-25 21:45:24 +01:00
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
2023-09-09 11:17:52 +02:00
|
|
|
#=================================================
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
2018-02-25 21:45:24 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD MODIFICATIONS
|
|
|
|
#=================================================
|
2023-09-09 11:17:52 +02:00
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2023-11-29 10:58:11 +01:00
|
|
|
ynh_systemd_action --service_name="$app" --action=stop
|
2019-09-10 22:43:45 +02:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
#=================================================
|
2018-02-25 21:45:24 +01:00
|
|
|
# MODIFY URL IN NGINX CONF
|
2023-09-09 11:17:52 +02:00
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
ynh_change_url_nginx_config
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# Setup gitea.ini
|
|
|
|
#=================================================
|
2019-09-10 22:43:45 +02:00
|
|
|
ynh_script_progression --message="Updating gitea configuration..."
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2023-11-29 10:58:11 +01:00
|
|
|
ynh_add_config --template="app.ini" --destination="$install_dir/custom/conf/app.ini"
|
|
|
|
_set_permissions
|
2019-02-16 12:59:32 +01:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALISATION
|
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Starting gitea services..." --weight=3
|
|
|
|
|
2023-11-29 10:58:11 +01:00
|
|
|
ynh_systemd_action --service_name="$app" --action=start --log_path="/var/log/$app/gitea.log" --line_match="$systemd_match_start_line"
|
2023-09-09 11:17:52 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2019-10-27 14:54:35 +01:00
|
|
|
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|