Guest User

Untitled

a guest
Sep 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # The script that is called in the trap must also stop the DB, so below call to
  4. # dropdb is not enough, it just demonstrates how to call anything in the stop-container scenario!
  5. trap "dropdb <params>" HUP INT QUIT TERM
  6.  
  7. # init your DB -every- time container starts
  8. <init script to import to clean and import dump>
  9.  
  10. # start your postgres DB
  11. postgres
  12.  
  13. echo "exited $0"
Add Comment
Please, Sign In to add comment