Skip to content

Commit

Permalink
fix issue with idle-check.sh cronjob not sourcing in global env
Browse files Browse the repository at this point in the history
variables correctly because cron only uses a minimal set of env
variables. Now idle-check.sh sources in /etc/profile for receiving the
global variables correctly.
  • Loading branch information
jens-maus committed Oct 28, 2024
1 parent 1fed58b commit cd350b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion buildroot-external/rootfs-overlay/bin/idle-check.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# shellcheck shell=dash disable=SC2169,SC3010
# shellcheck shell=dash disable=SC2169,SC3010 source=/dev/null
#
# System Idle Shutdown (idle-check.sh)
# ------------------------------------
Expand Down Expand Up @@ -50,6 +50,9 @@
# published by the Free Software Foundation, version 2.
#

# source global env variables
. /etc/profile

# default config
[[ -z "${SHUTDOWN_IDLE_INTERVAL}" ]] && SHUTDOWN_IDLE_INTERVAL=5
[[ -z "${SHUTDOWN_IDLE_TIME}" ]] && SHUTDOWN_IDLE_TIME=86400
Expand Down

0 comments on commit cd350b4

Please sign in to comment.