Chown legacy custom locations if they exist
This commit is contained in:
parent
32e37c440b
commit
ec6eed279d
|
|
@ -6,6 +6,15 @@ SERVICES_DIR_OLD="/config/custom-services.d"
|
||||||
SCRIPTS_DIR="/custom-cont-init.d"
|
SCRIPTS_DIR="/custom-cont-init.d"
|
||||||
SERVICES_DIR="/custom-services.d"
|
SERVICES_DIR="/custom-services.d"
|
||||||
|
|
||||||
|
# chown legacy folders if they exist
|
||||||
|
if [ -e "${SCRIPTS_DIR_OLD}" ]; then
|
||||||
|
chown -R 0:0 "${SCRIPTS_DIR_OLD}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e "${SERVICES_DIR_OLD}" ]; then
|
||||||
|
chown -R 0:0 "${SERVICES_DIR_OLD}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove all existing custom services before continuing to ensure
|
# Remove all existing custom services before continuing to ensure
|
||||||
# we aren't running anything the user may have removed
|
# we aren't running anything the user may have removed
|
||||||
if [ -n "$(/bin/ls -A /etc/services.d/custom-service-* 2>/dev/null)" ]; then
|
if [ -n "$(/bin/ls -A /etc/services.d/custom-service-* 2>/dev/null)" ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue