From 6312a7eab182b5c8428b3bdd2712213f214c227f Mon Sep 17 00:00:00 2001 From: Roland Date: Sat, 25 Feb 2023 18:46:27 -0700 Subject: [PATCH] Adding pgpass for wrolpi user. --- scripts/install_raspberrypios.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/install_raspberrypios.sh b/scripts/install_raspberrypios.sh index c570cb37..a4578b5b 100755 --- a/scripts/install_raspberrypios.sh +++ b/scripts/install_raspberrypios.sh @@ -59,7 +59,12 @@ cp /opt/wrolpi/50x.html /var/www/50x.html # Create the WROLPi user grep wrolpi /etc/passwd || useradd -md /home/wrolpi wrolpi -s "$(command -v bash)" -chown -R wrolpi:wrolpi /opt/wrolpi +cat >/home/wrolpi/.pgpass <<'EOF' +127.0.0.1:5432:gis:_renderd:wrolpi +127.0.0.1:5432:wrolpi:wrolpi:wrolpi +EOF +chown -R wrolpi:wrolpi /home/wrolpi /opt/wrolpi +chmod 0600 /home/wrolpi/.pgpass # Give WROLPi group a few privileged commands via sudo without password. cat >/etc/sudoers.d/90-wrolpi <<'EOF'