mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2025-09-02 18:18:31 +02:00
Merge branch 'v1.9' into add-fail2ban
This commit is contained in:
@ -26,6 +26,7 @@ dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
|
||||
admin=$(ynh_app_setting_get "$app" adminusername)
|
||||
key=$(ynh_app_setting_get "$app" secret_key)
|
||||
port=$(ynh_app_setting_get "$app" web_port)
|
||||
upstream_version=$(ynh_app_setting_get $app upstream_version)
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
@ -50,7 +51,7 @@ config_nginx
|
||||
config_gitea
|
||||
|
||||
# RELOAD services
|
||||
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "systemd" -a restart
|
||||
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -a restart -t 10
|
||||
sleep 1
|
||||
|
||||
# Store the checksum with the 'INTERNAL_TOKEN' value.
|
||||
|
@ -19,6 +19,7 @@ domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$(ynh_normalize_url_path $YNH_APP_ARG_PATH)
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
upstream_version=$(ynh_app_upstream_version)
|
||||
|
||||
# Check domain/path availability
|
||||
ynh_webpath_available $domain $path_url || ynh_die "$domain is not available as domain, please use an other domain."
|
||||
@ -110,16 +111,16 @@ ynh_add_fail2ban_config --logpath "/var/log/$app/gitea.log" --failregex ".*Faile
|
||||
set_access_settings
|
||||
|
||||
# Add gitea to YunoHost's monitored services
|
||||
yunohost service add "$app" --log "/var/log/$app/$app.log"
|
||||
yunohost service add "$app" --log "/var/log/$app/gitea.log"
|
||||
|
||||
# Configure logrotate
|
||||
ynh_use_logrotate "/var/log/$app"
|
||||
|
||||
# Save Version
|
||||
ynh_app_setting_set $app upstream_version $(ynh_app_upstream_version)
|
||||
ynh_app_setting_set $app upstream_version $upstream_version
|
||||
|
||||
# Reload services
|
||||
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "systemd"
|
||||
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10
|
||||
sleep 1
|
||||
|
||||
# Store the checksum with the 'INTERNAL_TOKEN' value.
|
||||
|
@ -20,6 +20,7 @@ path_url=$(ynh_app_setting_get "$app" path)
|
||||
dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
|
||||
admin=$(ynh_app_setting_get "$app" adminusername)
|
||||
port=$(ynh_app_setting_get "$app" web_port)
|
||||
upstream_version=$(ynh_app_setting_get $app upstream_version)
|
||||
|
||||
# Check domain/path availability with app helper
|
||||
ynh_webpath_available $domain $path_url || ynh_die "$domain is not available as domain, please use an other domain."
|
||||
@ -68,9 +69,9 @@ set_permission
|
||||
ynh_use_logrotate "/var/log/$app"
|
||||
|
||||
# Add gitea to YunoHost's monitored services
|
||||
yunohost service add "$app" --log /var/log/"$app"/"$app".log
|
||||
yunohost service add "$app" --log /var/log/"$app"/gitea.log
|
||||
|
||||
# Reload services
|
||||
systemctl reload nginx.service
|
||||
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "systemd"
|
||||
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10
|
||||
sleep 1
|
||||
|
@ -155,6 +155,10 @@ case $upstream_version in
|
||||
ynh_setup_source $final_path source/${architecture}_1.7
|
||||
restart_gitea
|
||||
;&
|
||||
"1.7."* )
|
||||
ynh_setup_source $final_path source/${architecture}_1.8
|
||||
restart_gitea
|
||||
;&
|
||||
esac
|
||||
|
||||
# Install gitea source
|
||||
@ -177,7 +181,7 @@ ynh_app_setting_set $app upstream_version $(ynh_app_upstream_version)
|
||||
set_access_settings
|
||||
|
||||
# Reload services
|
||||
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "systemd"
|
||||
ynh_systemd_action -l "Serving \[::\]:$port with pid" -p "/var/log/$app/gitea.log" -t 10
|
||||
sleep 1
|
||||
|
||||
# Store the checksum with the 'INTERNAL_TOKEN' value.
|
||||
|
Reference in New Issue
Block a user