mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2024-11-21 18:41:35 +01:00
60cb5e5ae4
* Move app install dir from /opt to /var/www * Revamp the way binaries are downloaded thanks to manifestv2 (no need to check for arch, etc) * Remove custom helpers (exec_as, ynh_handle_app_migration) * Rename LFS_KEY as LFS_JWT_SECRET and KEY as SECRET_KEY as named in app.ini * Add JWT_SECRET for oauth and INTERNAL_TOKEN in app.ini * update upstream sample app.ini URL * Disable actions for now. * Automatically add ssh permissions to the system user * Remove support for upgrade before 1.6.4. Edit test_upgrade_from accordingly.
52 lines
1.7 KiB
Bash
52 lines
1.7 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..." --weight=1
|
|
|
|
ynh_systemd_action --service_name="$app" --action="stop"
|
|
|
|
#=================================================
|
|
# MODIFY URL IN NGINX CONF
|
|
#=================================================
|
|
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
|
|
|
ynh_change_url_nginx_config
|
|
|
|
#=================================================
|
|
# SPECIFIC MODIFICATIONS
|
|
#=================================================
|
|
# Setup gitea.ini
|
|
#=================================================
|
|
ynh_script_progression --message="Updating gitea configuration..."
|
|
|
|
_gitea_add_config
|
|
_gitea_permissions_install_dir
|
|
|
|
#=================================================
|
|
# GENERIC FINALISATION
|
|
#=================================================
|
|
# START SYSTEMD SERVICE
|
|
#=================================================
|
|
ynh_script_progression --message="Starting gitea services..." --weight=3
|
|
|
|
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/gitea.log" --line_match="Starting new Web server: tcp:127.0.0.1:"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Change of URL completed for $app" --last
|