Use postgres user

This commit is contained in:
wpetit 2020-10-13 17:02:14 +02:00
parent 8cecc36bf3
commit 2a9f30452f
2 changed files with 2 additions and 0 deletions

View File

@ -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

1
debian/rules vendored
View File

@ -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