source:
npl/commonservers/postgresql/start
@
0105685
Last change on this file since 0105685 was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 393 bytes |
Rev | Line | |
---|---|---|
[c5c522c] | 1 | #!/bin/bash |
2 | ||
3 | TRY=10 | |
4 | svc -u /service/postgresql | |
5 | while ! psql -U postgresql -c '\q' template1 &> /dev/null; do | |
6 | echo "Waiting for postgresql to start.. ($TRY)" | |
7 | sleep 5 | |
8 | (( TRY-- )) | |
9 | if [ $TRY -eq 0 ]; then | |
10 | syn3-state postgresql CAUTION "Startup error" | |
11 | svc -d /service/postgresql | |
12 | exit 1 | |
13 | fi | |
14 | done | |
15 | syn3-state postgresql OK "Started" |
Note: See TracBrowser
for help on using the repository browser.