Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Running PostgreSQL with Supervisord
- /etc/init.d/postgresql start
- #!/bin/sh
- # This script is run by Supervisor to start PostgreSQL 9.1 in foreground mode
- if [ -d /var/run/postgresql ]; then
- chmod 2775 /var/run/postgresql
- else
- install -d -m 2775 -o postgres -g postgres /var/run/postgresql
- fi
- 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"
- [program:postgres]
- user=root
- group=root
- command=/usr/local/bin/run_postgresql.sh
- autostart=true
- autorestart=true
- stderr_logfile=/home/www-data/logs/postgres_err.log
- stdout_logfile=/home/www-data/logs/postgres_out.log
- redirect_stderr=true
- stopsignal=QUIT
- /etc/init.d/postgresql
- # create socket directory
- if [ -d /var/run/postgresql ]; then
- chmod 2775 /var/run/postgresql
- else
- install -d -m 2775 -o postgres -g postgres /var/run/postgresql
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement