mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
fix notify_app
This commit is contained in:
parent
4864bb867a
commit
35e9c956f4
4 changed files with 21 additions and 12 deletions
|
@ -73,6 +73,15 @@ ynh_print_info --message="Backing up the MySQL database..."
|
|||
|
||||
ynh_mysql_dump_db --database="$db_name" --default_character_set="utf8mb4" > db.sql
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NOTIFY_PUSH APP
|
||||
#=================================================
|
||||
|
||||
if [ $use_notify_push -eq 1 ]
|
||||
then
|
||||
ynh_backup --src_path="/etc/systemd/system/${app}-notify-push.service"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -16,6 +16,8 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
|
|||
|
||||
ynh_change_url_nginx_config
|
||||
|
||||
ynh_change_url_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -47,18 +49,14 @@ then
|
|||
sed --in-place --regexp-extended '/location = \/\.well\-known\/(caldav|carddav)/d' "/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
fi
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE NOTIFY_PUSH APP
|
||||
#=================================================
|
||||
|
||||
if [ $use_notify_push -eq 1 ]
|
||||
if [ $enable_notify_push -eq 1 ]
|
||||
then
|
||||
ynh_add_systemd_config --service="${app}-notify-push"
|
||||
|
||||
ynh_systemd_action --service_name="${app}-notify-push" --action=restart
|
||||
fi
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
|
@ -24,6 +24,7 @@ ynh_remove_fail2ban_config
|
|||
|
||||
# Remove notify push
|
||||
ynh_remove_systemd_config --service="${app}-notify-push"
|
||||
ynh_secure_remove --file="/var/run/$app/"
|
||||
|
||||
# Remove a cron file
|
||||
# TODO: Ensure that cron job is not running (How !?)
|
||||
|
|
|
@ -75,7 +75,7 @@ ynh_script_progression --message="Restoring data directory..." --weight=2
|
|||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE NOTIFY_PUSH APP
|
||||
# RESTORE THE NOTIFY_PUSH APP
|
||||
#=================================================
|
||||
|
||||
if [ $use_notify_push -eq 1 ]
|
||||
|
@ -83,8 +83,9 @@ then
|
|||
mkdir -p /var/run/$app/
|
||||
chown $app: /var/run/$app/
|
||||
|
||||
ynh_add_systemd_config --service="${app}-notify-push"
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/${app}-notify-push.service"
|
||||
|
||||
systemctl enable $app.service --quiet
|
||||
ynh_systemd_action --service_name="${app}-notify-push" --action=restart
|
||||
fi
|
||||
|
||||
|
@ -150,7 +151,7 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# CHECK IF NOTIFY_PUSH WORKS
|
||||
#=================================================
|
||||
|
||||
if [ $use_notify_push -eq 1 ]
|
||||
if [ $enable_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."
|
||||
|
|
Loading…
Add table
Reference in a new issue