2021-12-21 00:27:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# shellcheck source=start-utils
|
|
|
|
. "${SCRIPTS:-/}start-utils"
|
|
|
|
|
|
|
|
: "${SERVER_PORT:=25565}"
|
2022-04-10 15:58:18 +00:00
|
|
|
: "${ENABLE_AUTOSTOP:=false}"
|
|
|
|
: "${AUTOSTOP_TIMEOUT_EST:=3600}"
|
|
|
|
: "${AUTOSTOP_TIMEOUT_INIT:=1800}"
|
|
|
|
: "${AUTOSTOP_PERIOD:=10}"
|
2022-07-30 17:06:22 +00:00
|
|
|
: "${DEBUG_AUTOSTOP:=false}"
|
2021-12-21 00:27:27 +00:00
|
|
|
export SERVER_PORT
|
2022-04-10 15:58:18 +00:00
|
|
|
export ENABLE_AUTOSTOP
|
|
|
|
export AUTOSTOP_TIMEOUT_EST
|
|
|
|
export AUTOSTOP_TIMEOUT_INIT
|
|
|
|
export AUTOSTOP_PERIOD
|
2022-07-30 17:06:22 +00:00
|
|
|
export DEBUG_AUTOSTOP
|
2021-12-21 00:27:27 +00:00
|
|
|
|
|
|
|
log "Autostop functionality enabled"
|
|
|
|
|
|
|
|
isDebugging && set -x
|
|
|
|
|
2024-10-22 21:04:38 +00:00
|
|
|
isNumericElseSetToDefault "AUTOSTOP_PERIOD" 10
|
|
|
|
checkIfNotZeroElseSetToDefault "AUTOSTOP_PERIOD" 10
|
|
|
|
isNumericElseSetToDefault "AUTOSTOP_TIMEOUT_EST" 3600
|
|
|
|
isNumericElseSetToDefault "AUTOSTOP_TIMEOUT_INIT" 1800
|
2021-12-21 00:27:27 +00:00
|
|
|
|
2022-09-03 21:48:14 +00:00
|
|
|
/auto/autostop-daemon.sh &
|