File: pgbackrest.postinst

package info (click to toggle)
pgbackrest 1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 74,072 kB
  • ctags: 1,333
  • sloc: perl: 29,244; xml: 4,112; ansic: 98; makefile: 16; sh: 16
file content (24 lines) | stat: -rw-r--r-- 427 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -e

case $1 in
    configure)
	# Make sure we set the permissions only if no previous version
	# was installed.
	if test -z $2; then
	    USER="postgres"
	    GROUP="postgres"

	    DIRS="/var/log/pgbackrest /var/lib/pgbackrest /var/spool/pgbackrest"
	    for dir in $DIRS; do
		mkdir -p $dir
		chown ${USER}:${GROUP} $dir
	    done

	    chown ${USER}:${GROUP} /etc/pgbackrest.conf
	fi
    ;;
esac

#DEBHELPER#