contents: |
#!/bin/sh
exec 2>&1
- exec su - postgres -c '/usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main'
+ HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main
- file:
path: /root/upgrade_postgres
chmod: "+x"
contents: |
#!/bin/sh
exec 2>&1
- exec su - redis -s /bin/bash -c '/usr/bin/redis-server /etc/redis/redis.conf'
+ exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
- replace:
filename: "/etc/redis/redis.conf"
# postgres
cd $home
chown -R discourse:www-data /shared/log/rails
- LD_PRELOAD=/usr/lib/libjemalloc.so.1 exec su discourse -c 'bundle exec config/unicorn_launcher -E production -c config/unicorn.conf.rb'
+ LD_PRELOAD=/usr/lib/libjemalloc.so.1 HOME=/home/discourse USER=discourse exec chpst -u discourse:www-data -U discourse:www-data bundle exec config/unicorn_launcher -E production -c config/unicorn.conf.rb
- file:
path: /etc/service/nginx/run