daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest Sep 29th, 2015 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # patroni - patroni daemon
  2. #
  3. # controls startup/shutdown of postgres
  4. # you should disable any postgres start jobs
  5. # if enabling this
  6.  
  7. description    "patroni start daemon"
  8.  
  9. start on net-device-up
  10. stop on runlevel [06]
  11.  
  12. respawn
  13.  
  14. # if using a virtualenv, source it here by setting pythonhome
  15. env PYTHON_HOME=/var/lib/postgresql/patronienv
  16. #env PYTHON_HOME=/usr
  17.  
  18. # set location of patroni
  19. env PATRONI=/var/lib/postgresql/patroni
  20.  
  21. # set location of config file
  22. env PATRONICONF=/etc/patroni/patroni.yml
  23.  
  24. #         --pidfile /var/run/patroni.pid \
  25.  
  26. setuid postgres
  27.  
  28. script
  29.     exec start-stop-daemon --start \
  30.         --chuid postgres \
  31.         --exec $PYTHON_HOME/bin/python -- $PATRONI/patroni.py $PATRONICONF" \
  32.         >> /var/log/patroni.log 2>&1
  33. end script
RAW Paste Data
Top