fix: ampersand with no quotes truncates echo output (#421)
[discourse_docker.git] / templates / postgres.template.yml
index a970dcc7f575fa1d8d4d47f9f443793d61b3553e..681551cfeb704626930a82fba4ccebea58e992bc 100644 (file)
@@ -36,7 +36,7 @@ run:
      contents: |
         #!/bin/sh
         exec 2>&1
-        HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main
+        HOME=/var/lib/postgresql USER=postgres exec thpoff chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main
 
   - file:
      path: /etc/service/postgres/log/run
@@ -62,7 +62,7 @@ run:
 
        if [ ! "10" = "$PG_MAJOR_OLD" ]; then
          echo Upgrading PostgreSQL from version ${PG_MAJOR_OLD} to 10
-         free_disk=$(df /var | tail -n 1 | awk '{print $4}')
+         free_disk=$(df /shared | tail -n 1 | awk '{print $4}')
          required=$(($(du -s /shared/postgres_data | awk '{print $1}') * 2))
 
          if [ "$free_disk" -lt "$required" ]; then
@@ -103,7 +103,7 @@ run:
            echo
            echo When your instance is running:
            echo Run "./launcher enter app"
-           echo Run apt-get remove postgresql-client-9.5 && apt-get instatll postgresql-client-10
+           echo "Run apt-get remove postgresql-client-9.5 && apt-get install postgresql-client-10"
            echo Run "cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db"
            echo