From 4b179627a2368e9d330fa287506093fdb4a678a2 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 14 Sep 2024 23:46:57 -0400 Subject: [PATCH] enable auto-restart for PostgreSQL --- deploy-static | 2 +- systemd/system/postgresql.service.d/local.conf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 systemd/system/postgresql.service.d/local.conf diff --git a/deploy-static b/deploy-static index 7aed3ba..6c9ac6f 100755 --- a/deploy-static +++ b/deploy-static @@ -49,6 +49,6 @@ rsync -pcv --chmod=755 --fsync --preallocate remote-backup $remote:/usr/local/bi rsync -pcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.timer $remote:/etc/systemd/system/remote-backup.timer rsync -pcv --chmod=644 --fsync --preallocate systemd/system/remote-backup.service $remote:/etc/systemd/system/remote-backup.service rsync -pcv --chmod=644 --fsync --preallocate systemd/system/mjolnir.service $remote:/etc/systemd/system/mjolnir.service -rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate systemd/system/matterbridge.service.d $remote:/etc/systemd/system/ +rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate systemd/system/{matterbridge,postgresql}.service.d $remote:/etc/systemd/system/ rsync -pcv --chmod=644 --fsync --preallocate backup-public-key.txt cloud-archive.sh $remote: rsync -pcv --chmod=600 --chown postgres:postgres --fsync --preallocate postgres/data/{pg_hba,pg_ident,postgresql}.conf $remote:/var/lib/postgres/data/ diff --git a/systemd/system/postgresql.service.d/local.conf b/systemd/system/postgresql.service.d/local.conf new file mode 100644 index 0000000..8a764e3 --- /dev/null +++ b/systemd/system/postgresql.service.d/local.conf @@ -0,0 +1,2 @@ +[Service] +Restart=always