mirror of
				https://framagit.org/YunoHost-Apps/gitea_ynh.git
				synced 2025-10-30 05:15:30 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.8 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..."
 | |
| 
 | |
| ynh_add_config --template="app.ini" --destination="$install_dir/custom/conf/app.ini"
 | |
| _set_permissions
 | |
| 
 | |
| #=================================================
 | |
| # 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="$systemd_match_start_line"
 | |
| 
 | |
| #=================================================
 | |
| # END OF SCRIPT
 | |
| #=================================================
 | |
| 
 | |
| ynh_script_progression --message="Change of URL completed for $app" --last
 | 
