mirror of
https://github.com/hassio-addons/addon-prometheus.git
synced 2025-05-04 11:11:24 +00:00
🚑 Fix directory creation (#15)
This commit is contained in:
parent
dc313a598b
commit
5a6801e158
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/with-contenv bashio
|
||||
bashio::log.info 'Starting prometheus config generator...'
|
||||
|
||||
if [[ ! -d /share/promethus/targets ]] ; then
|
||||
if ! bashio::fs.directory_exists /share/prometheus/targets; then
|
||||
mkdir -p /share/prometheus/targets
|
||||
chown -R prometheus:prometheus /share/prometheus/targets
|
||||
fi
|
||||
|
|
|
@ -26,17 +26,17 @@ for var in $(bashio::config 'env_vars|keys'); do
|
|||
export "${name}=${value}"
|
||||
done
|
||||
|
||||
if [[ ! -d /data/prometheus ]] ; then
|
||||
if ! bashio::fs.directory_exists /data/prometheus; then
|
||||
mkdir -p /data/prometheus
|
||||
chown prometheus:prometheus /data/prometheus
|
||||
fi
|
||||
|
||||
if [[ ! -d /share/promethus/rules ]] ; then
|
||||
if ! bashio::fs.directory_exists /share/prometheus/rules; then
|
||||
mkdir -p /share/prometheus/rules
|
||||
chown -R prometheus:prometheus /share/prometheus/rules
|
||||
fi
|
||||
|
||||
if [[ ! -d /share/promethus/targets ]] ; then
|
||||
if ! bashio::fs.directory_exists /share/prometheus/targets; then
|
||||
mkdir -p /share/prometheus/targets
|
||||
chown -R prometheus:prometheus /share/prometheus/targets
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue