entrypoint.sh: don't bother creating the `WEBMIN_DATA_DIR` if `WEBMIN_ENABLED` is not `true`
parent
19b7a592b8
commit
88d59ad6a9
|
@ -29,20 +29,22 @@ fi
|
||||||
rm -rf /var/lib/bind
|
rm -rf /var/lib/bind
|
||||||
ln -sf ${BIND_DATA_DIR}/lib /var/lib/bind
|
ln -sf ${BIND_DATA_DIR}/lib /var/lib/bind
|
||||||
|
|
||||||
# create directory for webmin
|
|
||||||
mkdir -p ${WEBMIN_DATA_DIR}
|
|
||||||
|
|
||||||
# populate the default webmin configuration if it does not exist
|
|
||||||
if [ ! -d ${WEBMIN_DATA_DIR}/etc ]; then
|
|
||||||
mv /etc/webmin ${WEBMIN_DATA_DIR}/etc
|
|
||||||
fi
|
|
||||||
rm -rf /etc/webmin
|
|
||||||
ln -sf ${WEBMIN_DATA_DIR}/etc /etc/webmin
|
|
||||||
|
|
||||||
# create /var/run/named
|
# create /var/run/named
|
||||||
mkdir -m 0775 -p /var/run/named
|
mkdir -m 0775 -p /var/run/named
|
||||||
chown root:${BIND_USER} /var/run/named
|
chown root:${BIND_USER} /var/run/named
|
||||||
|
|
||||||
|
if [ "${WEBMIN_ENABLED}" == "true" ]; then
|
||||||
|
# create directory for webmin
|
||||||
|
mkdir -p ${WEBMIN_DATA_DIR}
|
||||||
|
|
||||||
|
# populate the default webmin configuration if it does not exist
|
||||||
|
if [ ! -d ${WEBMIN_DATA_DIR}/etc ]; then
|
||||||
|
mv /etc/webmin ${WEBMIN_DATA_DIR}/etc
|
||||||
|
fi
|
||||||
|
rm -rf /etc/webmin
|
||||||
|
ln -sf ${WEBMIN_DATA_DIR}/etc /etc/webmin
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$@" ]; then
|
if [ -z "$@" ]; then
|
||||||
if [ "${WEBMIN_ENABLED}" == "true" ]; then
|
if [ "${WEBMIN_ENABLED}" == "true" ]; then
|
||||||
if [ -z "${ROOT_PASSWORD}" ]; then
|
if [ -z "${ROOT_PASSWORD}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue