SC2017: Increase precision by replacing a/b*c with a*c/b.
This code intentionally rounds to an even value.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
# We use epoch and hope the nodes are close enough in clock.
# Even numbers mean service is shut down, odd numbers mean
# service is started.
+ # Intentionally round to an even number
+ # shellcheck disable=SC2017
state_even=$(( $(date '+%s') / 2 * 2))
# We must also let some time pass between stopping and