blob: 4a6f9b848f45f5526bb408d5850778a71c84bf78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
post_install() {
getent group postgres >/dev/null || groupadd -g 88 postgres
getent passwd postgres >/dev/null || useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /sbin/nologin postgres
passwd -l postgres >/dev/null
}
post_upgrade() {
post_install $1
}
post_remove() {
getent passwd postgres >/dev/null && userdel postgres
getent group postgres >/dev/null && groupdel postgres
}
|