diff --git a/debian/postgres-backup.service b/debian/postgres-backup.service index 5ea7628..a3547b1 100644 --- a/debian/postgres-backup.service +++ b/debian/postgres-backup.service @@ -4,6 +4,7 @@ Description=Run PostgreSQL backup [Service] Type=oneshot ExecStart=/usr/bin/pg_backup_rotated.sh -c /etc/postgres-backup/pg_backup.conf +User=postgres [Install] WantedBy=default.target \ No newline at end of file diff --git a/debian/rules b/debian/rules index 5af568d..340e69c 100644 --- a/debian/rules +++ b/debian/rules @@ -20,5 +20,6 @@ override_dh_auto_install: chmod +x debian/postgres-backup/usr/share/postgres-backup/pg_backup.sh install -D -m 644 debian/postgres-backup.timer debian/postgres-backup/lib/systemd/system/postgres-backup.timer + install -d -o postgres -g postgres debian/postgres-backup/var/backups/database/postgresql install -d debian/postgres-backup \ No newline at end of file