Make sure the permission is preserved when copying files.
[discourse_docker.git] / templates / postgres.10.template.yml
index d756309e8adf6e9f10285904199b9d405e8ab938..33baa107f84f2baedf464d4efa68966f786a9b67 100644 (file)
@@ -62,7 +62,7 @@ run:
          /etc/init.d/postgresql stop
          rm -fr /shared/postgres_data/postmaster.pid
          cd ~postgres
-         cp /etc/postgresql/${PG_MAJOR_OLD}/main/*.conf /shared/postgres_data
+         cp -p /etc/postgresql/${PG_MAJOR_OLD}/main/*.conf /shared/postgres_data
          echo  >> /shared/postgres_data/postgresql.conf
          echo "data_directory = '/shared/postgres_data'" >> /shared/postgres_data/postgresql.conf
          SUCCESS=true