Still chown old services folder if it exists
This commit is contained in:
parent
c285069d03
commit
3e69697264
|
|
@ -4,11 +4,18 @@
|
|||
SCRIPTS_DIR_OLD="/config/custom-cont-init.d"
|
||||
SCRIPTS_DIR="/custom-cont-init.d"
|
||||
|
||||
SERVICES_DIR_OLD="/config/custom-services.d"
|
||||
|
||||
# chown legacy folders if they exist
|
||||
if [ -e "${SCRIPTS_DIR_OLD}" ]; then
|
||||
chown -R 0:0 "${SCRIPTS_DIR_OLD}"
|
||||
fi
|
||||
|
||||
# chown legacy folders if they exist
|
||||
if [ -e "${SERVICES_DIR_OLD}" ]; then
|
||||
chown -R 0:0 "${SERVICES_DIR_OLD}"
|
||||
fi
|
||||
|
||||
if { [ -z "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]; } && \
|
||||
{ [ -z "$(/bin/ls -A ${SCRIPTS_DIR_OLD} 2>/dev/null)" ]; }; then
|
||||
echo "[custom-init] no custom files found, exiting..."
|
||||
|
|
|
|||
Loading…
Reference in a new issue