1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

self-test notify_push

This commit is contained in:
Kay0u 2021-06-08 20:24:33 +02:00
parent 274ad45c54
commit 4864bb867a
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
3 changed files with 33 additions and 0 deletions

View file

@ -281,6 +281,17 @@ ynh_script_progression --message="Configuring Fail2Ban..." --weight=8
# Create a dedicated Fail2Ban config # Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5 ynh_add_fail2ban_config --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
#=================================================
# CHECK IF NOTIFY_PUSH WORKS
#=================================================
if [ $use_notify_push -eq 1 ]
then
if ! ynh_exec_as "$app" nextcloud php7.3 $final_path/occ notify_push:self-test; then
ynh_print_warn --message="High Performance Backend is not working correctly, try to repair it or contact YNH support."
fi
fi
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -146,6 +146,17 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=3
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# CHECK IF NOTIFY_PUSH WORKS
#=================================================
if [ $use_notify_push -eq 1 ]
then
if ! ynh_exec_as "$app" nextcloud php7.3 $final_path/occ notify_push:self-test; then
ynh_print_warn --message="High Performance Backend is not working correctly, try to repair it or contact YNH support."
fi
fi
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -401,6 +401,17 @@ ynh_use_logrotate --non-append
# Create a dedicated Fail2Ban config # Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5 ynh_add_fail2ban_config --logpath="/var/log/$app/nextcloud.log" --failregex="^.*Login failed: '.*' \(Remote IP: '<HOST>'.*$" --max_retry=5
#=================================================
# CHECK IF NOTIFY_PUSH WORKS
#=================================================
if [ $use_notify_push -eq 1 ]
then
if ! ynh_exec_as "$app" nextcloud php7.3 $final_path/occ notify_push:self-test; then
ynh_print_warn --message="High Performance Backend is not working correctly, try to repair it or contact YNH support."
fi
fi
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================