Advertisement
Guest User

Untitled

a guest
Jul 18th, 2012
1,046
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. Running PostgreSQL with Supervisord
  2. /etc/init.d/postgresql start
  3.  
  4. #!/bin/sh
  5.  
  6. # This script is run by Supervisor to start PostgreSQL 9.1 in foreground mode
  7.  
  8. if [ -d /var/run/postgresql ]; then
  9. chmod 2775 /var/run/postgresql
  10. else
  11. install -d -m 2775 -o postgres -g postgres /var/run/postgresql
  12. fi
  13.  
  14. exec su postgres -c "/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf"
  15.  
  16. [program:postgres]
  17. user=root
  18. group=root
  19. command=/usr/local/bin/run_postgresql.sh
  20. autostart=true
  21. autorestart=true
  22. stderr_logfile=/home/www-data/logs/postgres_err.log
  23. stdout_logfile=/home/www-data/logs/postgres_out.log
  24. redirect_stderr=true
  25. stopsignal=QUIT
  26.  
  27. /etc/init.d/postgresql
  28.  
  29. # create socket directory
  30. if [ -d /var/run/postgresql ]; then
  31. chmod 2775 /var/run/postgresql
  32. else
  33. install -d -m 2775 -o postgres -g postgres /var/run/postgresql
  34. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement