summaryrefslogtreecommitdiff
path: root/build_files
diff options
context:
space:
mode:
Diffstat (limited to 'build_files')
-rwxr-xr-xbuild_files/build.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/build_files/build.sh b/build_files/build.sh
index 03adff0..5618d20 100755
--- a/build_files/build.sh
+++ b/build_files/build.sh
@@ -14,6 +14,20 @@ esac
# Copy the contents of system_files/ of the git repo to /
cp -avf "/ctx/system_files"/. /
+# Default HDMI-CEC to putting the TV into standby when the system sleeps.
+# `ujust toggle-cec-sleep enable` changes this same setting at runtime. Keep
+# the default in the base image's config so users do not need to run the
+# command manually after a fresh install; the runtime command can still
+# change it later.
+CEC_CONFIG=/etc/default/cec-control
+if [[ -f "${CEC_CONFIG}" ]]; then
+ if grep -q '^CEC_ONSLEEP_STANDBY=' "${CEC_CONFIG}"; then
+ sed -i 's/^CEC_ONSLEEP_STANDBY=.*/CEC_ONSLEEP_STANDBY=true/' "${CEC_CONFIG}"
+ else
+ printf '%s\n' 'CEC_ONSLEEP_STANDBY=true' >> "${CEC_CONFIG}"
+ fi
+fi
+
mkdir -p /etc/environment.d
if [[ -n "${FLATPAK_REMOTE_URL:-}" || -n "${HOMEBREW_BOTTLE_DOMAIN:-}" || -n "${HOMEBREW_API_DOMAIN:-}" ]]; then