mirror of
https://github.com/linuxserver/docker-swag.git
synced 2024-10-01 01:35:49 -04:00
ensure config files exist and has at least one value set
set_ini_value does not work on empty files
This commit is contained in:
parent
53bb2e284f
commit
d60847483d
@ -42,9 +42,9 @@ function set_ini_value() {
|
||||
-e '$a'"${name}"'='"${value}" "${3}"
|
||||
}
|
||||
|
||||
# ensure config files exist
|
||||
# ensure config files exist and has at least one value set (set_ini_value does not work on empty files)
|
||||
touch /config/etc/letsencrypt/cli.ini
|
||||
set_ini_value "agree-tos" "true" /config/etc/letsencrypt/cli.ini
|
||||
grep -qxF 'agree-tos' /config/etc/letsencrypt/cli.ini || echo 'agree-tos=true' >> /config/etc/letsencrypt/cli.ini
|
||||
|
||||
# copy dns default configs
|
||||
cp -n /defaults/dns-conf/* /config/dns-conf/
|
||||
|
Loading…
Reference in New Issue
Block a user