Skip to content

Commit

Permalink
FIX: stop using su to daemonize stuff, we have no process to talk to
Browse files Browse the repository at this point in the history
FIX: use fast shutdown for postgres
  • Loading branch information
SamSaffron committed Oct 9, 2014
1 parent 569bd6e commit c244475
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion templates/postgres.template.yml
Expand Up @@ -157,7 +157,9 @@ run:

- exec:
background: true
cmd: su - postgres -c '/usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main'
# use fast shutdown for pg
stop_signal: INT
cmd: 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

# give db a few secs to start up
- exec: "sleep 5"
Expand Down
2 changes: 1 addition & 1 deletion templates/redis.template.yml
Expand Up @@ -39,7 +39,7 @@ hooks:
before_code:
- exec:
background: true
cmd: su - redis -s /bin/bash -c '/usr/bin/redis-server /etc/redis/redis.conf'
cmd: exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
after_code:
- replace:
filename: /etc/service/unicorn/run
Expand Down

0 comments on commit c244475

Please sign in to comment.