Still chown old services folder if it exists

This commit is contained in:
TheSpad 2022-06-10 16:34:16 +01:00
parent c285069d03
commit 3e69697264
No known key found for this signature in database
GPG key ID: 08F06191F4587860

View file

@ -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..."