File: gm-set_gm-dbo_password

package info (click to toggle)
gnumed-server 21.11-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 45,408 kB
  • ctags: 3,891
  • sloc: sql: 1,210,640; python: 13,526; sh: 1,476; makefile: 19
file content (18 lines) | stat: -rwxr-xr-x 474 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

#==============================================================
# author: Karsten Hilbert
# license: GPL v2 or later
#
# This wrapper allows setting the password for gm-dbo.
#
# It must be run as root.
#
#==============================================================

PASSWD="$1"
SQL="ALTER ROLE \\\"gm-dbo\\\" ENCRYPTED PASSWORD '${PASSWD}';"

su -c "psql -d template1 -c \"${SQL}\"" -l postgres

#==============================================================