Skip to content

Commit e256619

Browse files
committed
ghe-maintenance-mode-enable noops when license file doesn't exist
This means the VM is entirely fresh and hasn't been setup yet so there's no need to wait on processes to finish.
1 parent 2157db1 commit e256619

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libexec/ghe-maintenance-mode-enable

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ $wait_procs || exit 0
5353
ghe-ssh "$host" -- /bin/sh <<EOF
5454
set -e
5555
56+
# no license file means a fresh VM and no procs to wait on.
57+
# bail out in this case.
58+
if [ ! -f "$GHE_REMOTE_LICENSE_FILE" ]; then
59+
exit 0
60+
fi
61+
5662
# determine local admin auth token
5763
token=\$(md5sum "$GHE_REMOTE_LICENSE_FILE" | cut -f 1 -d ' ')
5864

0 commit comments

Comments
 (0)