Update configuration script with better permissions behavior

fixes #30
This commit is contained in:
Andrew Roberts 2020-01-28 19:43:38 -05:00 committed by GitHub
parent d29b2f8981
commit 96bb6e55f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,21 +1,25 @@
#!/usr/bin/with-contenv bash
# make our folders
# make our folders
mkdir -p \
/var/cache/ddclient \
/var/run/ddclient
/var/cache/ddclient \
/var/run/ddclient
# copy default config if not present in /config
[[ ! -e /config/ddclient.conf ]] && \
cp /defaults/ddclient.conf /config
cp /defaults/ddclient.conf /config
# copy config from /config to root
cp /config/ddclient.conf /ddclient.conf
# permissions
# permissions
chown -R abc:abc \
/config \
/var/cache/ddclient \
/var/run/ddclient
chmod -R 600 \
/config
/config \
/var/cache/ddclient \
/var/run/ddclient \
/ddclient.conf
chmod 700 /config
chmod 600 \
/config/* \
/ddclient.conf