[__consul_agent] make conf_dir depent on the OS

This commit is contained in:
Nico Schottelius 2020-03-26 21:48:17 +01:00
parent f7d5f5bc97
commit 66d9905029

View file

@ -1,7 +1,7 @@
#!/bin/sh -e #!/bin/sh -e
# #
# 2015 Steven Armstrong (steven-cdist at armstrong.cc) # 2015 Steven Armstrong (steven-cdist at armstrong.cc)
# 2015-2019 Nico Schottelius (nico-cdist at schottelius.org) # 2015-2020 Nico Schottelius (nico-cdist at schottelius.org)
# 2019 Timothée Floure (timothee.floure at ungleich.ch) # 2019 Timothée Floure (timothee.floure at ungleich.ch)
# #
# This file is part of cdist. # This file is part of cdist.
@ -37,10 +37,22 @@ fi
# Those are default that might be overriden by os-specific logic. # Those are default that might be overriden by os-specific logic.
data_dir="/var/lib/consul" data_dir="/var/lib/consul"
conf_dir="/etc/consul/conf.d"
conf_file="config.json"
tls_dir="$conf_dir/tls" tls_dir="$conf_dir/tls"
case "$os" in
alpine)
conf_dir="/etc/consul"
conf_file="server.json"
;;
*)
conf_dir="/etc/consul/conf.d"
conf_file="config.json"
;;
esac
### ###
# Sane deployment, based on distribution package when available. # Sane deployment, based on distribution package when available.