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