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:
parent
acd4789dd5
commit
53184d3ee5
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue