File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -94,10 +94,15 @@ mkdir -p "$backup_dir"
94
94
# Removes the remote sync-in-progress file on exit, re-enabling GC operations
95
95
# on the remote instance.
96
96
cleanup () {
97
+ for pid in $( jobs -p) ; do
98
+ kill -KILL $pid > /dev/null 2>&1 || true
99
+ done
100
+
97
101
# Enable remote GC operations
98
102
for hostname in $hostnames ; do
99
103
ghe-gc-enable -F $config_file $hostname :$port
100
104
done
105
+
101
106
rm -f $config_file
102
107
rm -rf $tempdir
103
108
}
@@ -322,7 +327,10 @@ for file_list in $tempdir/*.rsync; do
322
327
323
328
sync_data $hostname $file_list &
324
329
done
325
- wait
330
+
331
+ for pid in $( jobs -p) ; do
332
+ wait $pid
333
+ done
326
334
bm_end " $( basename $0 ) - Repo sync"
327
335
328
336
# Since there are no routes for special data directories
You can’t perform that action at this time.
0 commit comments