1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gogs_ynh.git synced 2024-09-03 20:36:23 +02:00

cleaning up

This commit is contained in:
ericgaspar 2022-04-10 13:42:21 +02:00
parent a81f3c561d
commit c754784509
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 22 additions and 18 deletions

View file

@ -92,6 +92,14 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# CREATE DATA DIRECTORY
#=================================================
@ -113,8 +121,9 @@ chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# MODIFY A CONFIG FILE
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
if [ "$path_url" = "/" ]
then
@ -130,17 +139,14 @@ chown $app:$app "$final_path/custom/conf/app.ini"
ynh_add_config --template="../conf/ldap.conf" --destination="$final_path/custom/conf/auth.d/ldap.conf"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
# Configure init script
ynh_add_systemd_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -71,8 +71,6 @@ then
ynh_secure_remove --file="$datadir"
fi
ynh_secure_remove --file="/var/log/$app"
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
@ -89,6 +87,13 @@ ynh_script_progression --message="Removing NGINX web server configuration..." --
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..." --weight=1
ynh_secure_remove --file="/var/log/$app"
#=================================================
# REMOVE DEDICATED USER
#=================================================

View file

@ -69,13 +69,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=2
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# Clean template to fix issue : https://github.com/gogits/gogs/issues/4585
ynh_secure_remove --file="$final_path/templates"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================