Move var declaration to top of script for clarity

This commit is contained in:
TheSpad 2022-09-09 16:31:49 +01:00
parent 1bc2cd870f
commit 2ee8af10f9
No known key found for this signature in database
GPG key ID: 08F06191F4587860

View file

@ -1,6 +1,12 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# Define custom folder paths
SCRIPTS_DIR_OLD="/config/custom-cont-init.d"
SCRIPTS_DIR="/custom-cont-init.d"
SERVICES_DIR_OLD="/config/custom-services.d"
SERVICES_DIR="/custom-services.d"
# Set executable bit on cont-init and services built into the image
set_legacy_executable_bits() {
mkdir -p /etc/{cont-init.d,services.d}
@ -264,11 +270,6 @@ run_mods() {
# Main script loop
SCRIPTS_DIR_OLD="/config/custom-cont-init.d"
SCRIPTS_DIR="/custom-cont-init.d"
SERVICES_DIR_OLD="/config/custom-services.d"
SERVICES_DIR="/custom-services.d"
if [ ! -d "/custom-cont-init.d" ] && [ ! -d "/custom-services.d" ]; then
# Tamper check legacy custom folders
tamper_check_legacy