Skip to content

Commit

Permalink
Merge pull request #2698 from cybozu-go/skip-daily-reboot
Browse files Browse the repository at this point in the history
Allow disabling daily reboot
  • Loading branch information
masa213f authored Oct 16, 2024
2 parents 10b00c8 + 8a9847f commit 3303fa6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/usr/bin/trigger-reboot-all-nodes
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ CKECLI_COMMAND="/usr/bin/ckecli"
NECO_COMMAND="/usr/bin/neco"
UNAME_COMMAND="/usr/bin/uname"
YES_COMMAND="/usr/bin/yes"
NOREBOOT_FILE="/tmp/no-reboot"

ENVIROMENT=$(${NECO_COMMAND} config get env)
if [ "$ENVIROMENT" != "dev" ]; then
echo "This script is only for dev environment"
exit 0
fi

if [ -f ${NOREBOOT_FILE} ]; then
echo "The no-reboot file exists. Skipping reboot all nodes"
exit 0
fi

# Confirm that host is a learder
HOSTNAME=$(${UNAME_COMMAND} -n)
LEADER=$(${NECO_COMMAND} rebooter leader)
Expand Down

0 comments on commit 3303fa6

Please sign in to comment.