Redid networking
This commit is contained in:
+4
-3
@@ -87,16 +87,17 @@ in
|
||||
Type = "oneshot";
|
||||
ExecStart = pkgs.writeShellScript "backup-pre" ''
|
||||
set -euo pipefail
|
||||
podman="${pkgs.podman}/bin/podman"
|
||||
|
||||
# Put Nextcloud into maintenance mode (if running)
|
||||
if systemctl is-active --quiet podman-nextcloud.service; then
|
||||
podman exec nextcloud php occ maintenance:mode --on || true
|
||||
$podman exec nextcloud php occ maintenance:mode --on || true
|
||||
fi
|
||||
|
||||
# Dump postgres (if running)
|
||||
if systemctl is-active --quiet podman-nextcloud-postgres.service; then
|
||||
install -d -m 700 ${dataDir}/nextcloud/db-dump
|
||||
podman exec nextcloud-postgres \
|
||||
$podman exec nextcloud-postgres \
|
||||
pg_dump -U postgres nextcloud_db \
|
||||
> ${dataDir}/nextcloud/db-dump/nextcloud.sql
|
||||
fi
|
||||
@@ -111,7 +112,7 @@ in
|
||||
ExecStart = pkgs.writeShellScript "backup-post" ''
|
||||
set -euo pipefail
|
||||
if systemctl is-active --quiet podman-nextcloud.service; then
|
||||
podman exec nextcloud php occ maintenance:mode --off || true
|
||||
${pkgs.podman}/bin/podman exec nextcloud php occ maintenance:mode --off || true
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user