1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/piped_ynh.git synced 2024-09-03 20:05:54 +02:00

Stop API for backup.

This commit is contained in:
orhtej2 2024-01-28 20:38:56 +01:00
parent acd4789dd5
commit 53184d3ee5

View file

@ -46,8 +46,12 @@ ynh_backup --src_path="/etc/systemd/system/$app-proxy.service"
#=================================================
ynh_print_info --message="Backing up the PostgreSQL database..."
ynh_systemd_action --service_name=$app-api --action="stop" --log_path="/var/log/$app/$app-api.log" --line_match="Shutdown completed"
ynh_psql_dump_db --database="$db_name" > db.sql
ynh_systemd_action --service_name=$app-api --action="start" --log_path="/var/log/$app/$app-api.log" --line_match="HTTP Server is listening on"
#=================================================
# END OF SCRIPT
#=================================================