Move var declaration to top of script for clarity
This commit is contained in:
parent
1bc2cd870f
commit
2ee8af10f9
|
|
@ -1,6 +1,12 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=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 executable bit on cont-init and services built into the image
|
||||||
set_legacy_executable_bits() {
|
set_legacy_executable_bits() {
|
||||||
mkdir -p /etc/{cont-init.d,services.d}
|
mkdir -p /etc/{cont-init.d,services.d}
|
||||||
|
|
@ -264,11 +270,6 @@ run_mods() {
|
||||||
|
|
||||||
# Main script loop
|
# 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
|
if [ ! -d "/custom-cont-init.d" ] && [ ! -d "/custom-services.d" ]; then
|
||||||
# Tamper check legacy custom folders
|
# Tamper check legacy custom folders
|
||||||
tamper_check_legacy
|
tamper_check_legacy
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue