changed function order in backup script
This commit is contained in:
parent
f0814f4bbf
commit
c32a7b74ff
@ -1,5 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
function check_railsserver_available {
|
||||
# wait for zammad process coming up
|
||||
until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do
|
||||
echo "backup waiting for zammads railsserver to be ready..."
|
||||
sleep 2
|
||||
done
|
||||
}
|
||||
|
||||
function zammad_backup {
|
||||
TIMESTAMP="$(date +'%Y%m%d%H%M%S')"
|
||||
|
||||
@ -15,14 +23,6 @@ function zammad_backup {
|
||||
pg_dump --dbname=postgresql://postgres@zammad-postgresql:5432/zammad_production | gzip > ${BACKUP_DIR}/${TIMESTAMP}_zammad_db.psql.gz
|
||||
}
|
||||
|
||||
function check_railsserver_available {
|
||||
# wait for zammad process coming up
|
||||
until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do
|
||||
echo "backup waiting for zammads railsserver to be ready..."
|
||||
sleep 2
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$1" = 'zammad-backup' ]; then
|
||||
|
||||
check_railsserver_available
|
||||
|
Loading…
Reference in New Issue
Block a user