File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
share/github-backup-utils Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,15 @@ cleanup() {
90
90
91
91
# Enable remote GC operations
92
92
for hostname in $hostnames ; do
93
- ghe-gc-enable $ssh_config_file_opt $hostname :$port || true
93
+ ghe-gc-enable $ssh_config_file_opt $hostname :$port || {
94
+ echo " Re-enable gc on $hostname failed, please manually delete $SYNC_IN_PROGRESS_FILE " 1>&2
95
+ }
94
96
done
95
97
96
98
ghe-ssh " $GHE_HOSTNAME " -- rm -rf $remote_tempdir
97
99
rm -rf $tempdir
98
100
}
99
- trap ' cleanup' EXIT
100
- trap ' exit $?' INT # ^C always terminate
101
+ trap ' cleanup' EXIT INT
101
102
102
103
# Disable remote GC operations
103
104
for hostname in $hostnames ; do
Original file line number Diff line number Diff line change @@ -59,7 +59,9 @@ mkdir -p "$backup_dir"
59
59
cleanup () {
60
60
# Enable remote maintenance operations
61
61
for hostname in $hostnames ; do
62
- ghe-gc-enable $ssh_config_file_opt $hostname :$port || true
62
+ ghe-gc-enable $ssh_config_file_opt $hostname :$port || {
63
+ echo " Re-enable gc on $hostname failed, please manually delete $SYNC_IN_PROGRESS_FILE " 1>&2
64
+ }
63
65
done
64
66
65
67
ghe-ssh " $GHE_HOSTNAME " -- rm -rf $remote_tempdir
You can’t perform that action at this time.
0 commit comments