Skip to content

Commit 1835d65

Browse files
authored
web: recreate interface_config.js on container restart
Recreate interface_config.js on container restart if custom-interface_config.js exists
1 parent b555d41 commit 1835d65

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

web/rootfs/etc/cont-init.d/10-config

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,19 @@ if [[ -f /config/custom-config.js ]]; then
8282
cat /config/custom-config.js >> /config/config.js
8383
fi
8484

85-
if [[ ! -f /config/interface_config.js ]]; then
85+
if [[ ! -f /config/interface_config.js || -f /config/custom-interface_config.js ]]; then
8686
cp /defaults/interface_config.js /config/interface_config.js
87-
if [[ -f /config/custom-interface_config.js ]]; then
88-
cat /config/custom-interface_config.js >> /config/interface_config.js
89-
fi
87+
fi
9088

91-
# It will remove parameter 'closedcaptions' from TOOLBAR_BUTTONS if ENABLE_TRANSCRIPTIONS is false,
92-
# because it enabled by default, but not supported out of the box.
93-
if [[ $ENABLE_TRANSCRIPTIONS -ne 1 && "$ENABLE_TRANSCRIPTIONS" != "true" ]]; then
94-
sed -i \
95-
-e "s#'closedcaptions', ##" \
96-
/config/interface_config.js
97-
fi
89+
if [[ -f /config/custom-interface_config.js ]]; then
90+
cat /config/custom-interface_config.js >> /config/interface_config.js
9891
fi
92+
93+
# It will remove parameter 'closedcaptions' from TOOLBAR_BUTTONS if ENABLE_TRANSCRIPTIONS is false,
94+
# because it enabled by default, but not supported out of the box.
95+
if [[ $ENABLE_TRANSCRIPTIONS -ne 1 && "$ENABLE_TRANSCRIPTIONS" != "true" ]]; then
96+
sed -i \
97+
-e "s#'closedcaptions', ##" \
98+
/config/interface_config.js
99+
fi
100+

0 commit comments

Comments
 (0)