new arg "fix_perm"
podman volume does not give new volumes permissions that match the original parmissions.
This commit is contained in:
parent
4995d90d49
commit
8941a8569e
17
run.sh
17
run.sh
@ -12,6 +12,17 @@ function setPostgresPassword() {
|
|||||||
sudo -u postgres psql -c "ALTER USER renderer PASSWORD '${PGPASSWORD:-renderer}'"
|
sudo -u postgres psql -c "ALTER USER renderer PASSWORD '${PGPASSWORD:-renderer}'"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fix_perm() {
|
||||||
|
# podman volume does not give new volumes
|
||||||
|
# permissions that match the original parmissions.
|
||||||
|
# correct this here
|
||||||
|
|
||||||
|
#chown postgres.postgres /var/lib/postgresql/12/main
|
||||||
|
#chown renderer.root /var/lib/mod_tile
|
||||||
|
chmod 750 /var/lib/postgresql/12/main
|
||||||
|
chmod 755 /var/lib/mod_tile
|
||||||
|
}
|
||||||
|
|
||||||
if [ "$#" -ne 1 ]; then
|
if [ "$#" -ne 1 ]; then
|
||||||
echo "usage: <import|run>"
|
echo "usage: <import|run>"
|
||||||
echo "commands:"
|
echo "commands:"
|
||||||
@ -25,6 +36,12 @@ fi
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
if [ "$1" = "fix_perm" ]; then
|
||||||
|
# this must be done before import
|
||||||
|
fix_perm
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$1" = "import" ]; then
|
if [ "$1" = "import" ]; then
|
||||||
# Ensure that database directory is in right state
|
# Ensure that database directory is in right state
|
||||||
chown postgres:postgres -R /var/lib/postgresql
|
chown postgres:postgres -R /var/lib/postgresql
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user