2018-02-25 21:45:24 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
2018-02-25 21:45:24 +01:00
|
|
|
|
|
|
|
#=================================================
|
2023-09-09 11:17:52 +02:00
|
|
|
# STOP SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_script_progression "Stopping $app's systemd service..."
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_systemctl --service="$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
|
|
|
#=================================================
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_script_progression "Updating NGINX web server configuration..."
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_config_change_url_nginx
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
#=================================================
|
|
|
|
# SPECIFIC MODIFICATIONS
|
|
|
|
#=================================================
|
|
|
|
# Setup gitea.ini
|
|
|
|
#=================================================
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_script_progression "Updating gitea configuration..."
|
2018-02-25 21:45:24 +01:00
|
|
|
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_config_add --template="app.ini" --destination="$install_dir/custom/conf/app.ini"
|
2023-11-29 10:58:11 +01:00
|
|
|
_set_permissions
|
2019-02-16 12:59:32 +01:00
|
|
|
|
2023-09-09 11:17:52 +02:00
|
|
|
#=================================================
|
|
|
|
# START SYSTEMD SERVICE
|
|
|
|
#=================================================
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_script_progression "Starting gitea services..."
|
2023-09-09 11:17:52 +02:00
|
|
|
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_systemctl --service="$app" --action=start --log_path="/var/log/$app/gitea.log" --wait_until="$systemd_match_start_line"
|
2023-09-09 11:17:52 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2019-10-27 14:54:35 +01:00
|
|
|
|
2024-08-30 22:57:28 +02:00
|
|
|
ynh_script_progression "Change of URL completed for $app"
|