File tree Expand file tree Collapse file tree 2 files changed +3
-34
lines changed
ansible/files/admin_api_scripts Expand file tree Collapse file tree 2 files changed +3
-34
lines changed Original file line number Diff line number Diff line change @@ -28,15 +28,6 @@ cleanup() {
28
28
exit $EXIT_CODE
29
29
}
30
30
31
- cleanup () {
32
- UPGRADE_STATUS=${1:- " failed" }
33
- EXIT_CODE=${?:- 0}
34
-
35
- echo " ${UPGRADE_STATUS} " > /tmp/pg-upgrade-status
36
-
37
- exit $EXIT_CODE
38
- }
39
-
40
31
function complete_pg_upgrade {
41
32
if [ -f /tmp/pg-upgrade-status ]; then
42
33
echo " Upgrade job already started. Bailing."
@@ -60,7 +51,9 @@ function complete_pg_upgrade {
60
51
61
52
if [ -d /data/sql ]; then
62
53
for FILE in /data/sql/* .sql; do
63
- run_sql -f $FILE
54
+ if [ -f " $FILE " ]; then
55
+ run_sql -f $FILE
56
+ fi
64
57
done
65
58
fi
66
59
Original file line number Diff line number Diff line change @@ -24,30 +24,6 @@ run_sql() {
24
24
psql -h localhost -U supabase_admin -d postgres -c " $STATEMENT "
25
25
}
26
26
27
- function shutdown_services {
28
- if [[ $( systemctl is-active gotrue) == " active" ]]; then
29
- echo " stopping gotrue"
30
- systemctl stop gotrue || true
31
- fi
32
-
33
- if [[ $( systemctl is-active postgrest) == " active" ]]; then
34
- echo " stopping postgrest"
35
- systemctl stop postgrest || true
36
- fi
37
- }
38
-
39
- function start_services {
40
- if [[ $( systemctl is-active gotrue) == " inactive" ]]; then
41
- echo " starting gotrue"
42
- systemctl start gotrue || true
43
- fi
44
-
45
- if [[ $( systemctl is-active postgrest) == " inactive" ]]; then
46
- echo " starting postgrest"
47
- systemctl start postgrest || true
48
- fi
49
- }
50
-
51
27
cleanup () {
52
28
UPGRADE_STATUS=${1:- " failed" }
53
29
EXIT_CODE=${?:- 0}
You can’t perform that action at this time.
0 commit comments