26 lines
493 B
Plaintext
26 lines
493 B
Plaintext
|
#!/usr/bin/with-contenv bash
|
||
|
|
||
|
# make our folders
|
||
|
mkdir -p \
|
||
|
/var/cache/ddclient \
|
||
|
/var/run/ddclient
|
||
|
|
||
|
# copy default config if not present in /config
|
||
|
[[ ! -e /config/ddclient.conf ]] && \
|
||
|
cp /defaults/ddclient.conf /config
|
||
|
|
||
|
# copy config from /config to root
|
||
|
cp /config/ddclient.conf /ddclient.conf
|
||
|
|
||
|
# permissions
|
||
|
chown -R abc:abc \
|
||
|
/config \
|
||
|
/var/cache/ddclient \
|
||
|
/var/run/ddclient \
|
||
|
/ddclient.conf
|
||
|
|
||
|
chmod 700 /config
|
||
|
chmod 600 \
|
||
|
/config/* \
|
||
|
/ddclient.conf
|