changed path of the data store from /app/data to /data
parent
35fe73d978
commit
907938b1f6
|
@ -15,5 +15,5 @@ RUN chmod 755 /init
|
||||||
|
|
||||||
EXPOSE 53/udp
|
EXPOSE 53/udp
|
||||||
EXPOSE 10000
|
EXPOSE 10000
|
||||||
VOLUME ["/app/data"]
|
VOLUME ["/data"]
|
||||||
CMD ["/init"]
|
CMD ["/init"]
|
||||||
|
|
28
init
28
init
|
@ -6,35 +6,35 @@ ROOT_PASSWORD=$(pwgen -c -n -1 12)
|
||||||
echo "root:$ROOT_PASSWORD" | chpasswd
|
echo "root:$ROOT_PASSWORD" | chpasswd
|
||||||
echo User: root Password: $ROOT_PASSWORD
|
echo User: root Password: $ROOT_PASSWORD
|
||||||
|
|
||||||
chmod 775 /app/data
|
chmod 775 /data
|
||||||
|
|
||||||
# create directory for bind config
|
# create directory for bind config
|
||||||
mkdir -p /app/data/bind
|
mkdir -p /data/bind
|
||||||
chown -R root:bind /app/data/bind
|
chown -R root:bind /data/bind
|
||||||
|
|
||||||
# populate default bind configuration if it does not exist
|
# populate default bind configuration if it does not exist
|
||||||
if [ ! -d /app/data/bind/etc ]; then
|
if [ ! -d /data/bind/etc ]; then
|
||||||
mv /etc/bind /app/data/bind/etc
|
mv /etc/bind /data/bind/etc
|
||||||
fi
|
fi
|
||||||
rm -rf /etc/bind
|
rm -rf /etc/bind
|
||||||
ln -sf /app/data/bind/etc /etc/bind
|
ln -sf /data/bind/etc /etc/bind
|
||||||
|
|
||||||
if [ ! -d /app/data/bind/lib ]; then
|
if [ ! -d /data/bind/lib ]; then
|
||||||
mkdir -p /app/data/bind/lib
|
mkdir -p /data/bind/lib
|
||||||
chown root:bind /app/data/bind/lib
|
chown root:bind /data/bind/lib
|
||||||
fi
|
fi
|
||||||
rm -rf /var/lib/bind
|
rm -rf /var/lib/bind
|
||||||
ln -sf /app/data/bind/lib /var/lib/bind
|
ln -sf /data/bind/lib /var/lib/bind
|
||||||
|
|
||||||
# create directory for webmin
|
# create directory for webmin
|
||||||
mkdir -p /app/data/webmin
|
mkdir -p /data/webmin
|
||||||
|
|
||||||
# populate the default webmin configuration if it does not exist
|
# populate the default webmin configuration if it does not exist
|
||||||
if [ ! -d /app/data/webmin/etc ]; then
|
if [ ! -d /data/webmin/etc ]; then
|
||||||
mv /etc/webmin /app/data/webmin/etc
|
mv /etc/webmin /data/webmin/etc
|
||||||
fi
|
fi
|
||||||
rm -rf /etc/webmin
|
rm -rf /etc/webmin
|
||||||
ln -sf /app/data/webmin/etc /etc/webmin
|
ln -sf /data/webmin/etc /etc/webmin
|
||||||
|
|
||||||
/etc/init.d/webmin start
|
/etc/init.d/webmin start
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue