mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -06:00
fixes invalid folder check
-f check if a file exists. -d checks if the dir exists
This commit is contained in:
parent
7ce18ec4f7
commit
5dc864b47f
@ -31,13 +31,13 @@ case "$1" in
|
||||
cp /usr/share/grafana/conf/ldap.toml /etc/grafana/ldap.toml
|
||||
fi
|
||||
|
||||
if [ ! -f $PROVISIONING_CFG_DIR ]; then
|
||||
if [ ! -d $PROVISIONING_CFG_DIR ]; then
|
||||
mkdir -p $PROVISIONING_CFG_DIR/dashboards $PROVISIONING_CFG_DIR/datasources
|
||||
cp /usr/share/grafana/conf/provisioning/dashboards/sample.yaml $PROVISIONING_CFG_DIR/dashboards/sample.yaml
|
||||
cp /usr/share/grafana/conf/provisioning/datasources/sample.yaml $PROVISIONING_CFG_DIR/datasources/sample.yaml
|
||||
fi
|
||||
|
||||
if [ ! -f $PROVISIONING_CFG_DIR/notifiers ]; then
|
||||
if [ ! -d $PROVISIONING_CFG_DIR/notifiers ]; then
|
||||
mkdir -p $PROVISIONING_CFG_DIR/notifiers
|
||||
cp /usr/share/grafana/conf/provisioning/notifiers/sample.yaml $PROVISIONING_CFG_DIR/notifiers/sample.yaml
|
||||
fi
|
||||
|
@ -45,13 +45,13 @@ if [ $1 -eq 1 ] ; then
|
||||
cp /usr/share/grafana/conf/ldap.toml /etc/grafana/ldap.toml
|
||||
fi
|
||||
|
||||
if [ ! -f $PROVISIONING_CFG_DIR ]; then
|
||||
if [ ! -d $PROVISIONING_CFG_DIR ]; then
|
||||
mkdir -p $PROVISIONING_CFG_DIR/dashboards $PROVISIONING_CFG_DIR/datasources
|
||||
cp /usr/share/grafana/conf/provisioning/dashboards/sample.yaml $PROVISIONING_CFG_DIR/dashboards/sample.yaml
|
||||
cp /usr/share/grafana/conf/provisioning/datasources/sample.yaml $PROVISIONING_CFG_DIR/datasources/sample.yaml
|
||||
fi
|
||||
|
||||
if [ ! -f $PROVISIONING_CFG_DIR/notifiers ]; then
|
||||
if [ ! -d $PROVISIONING_CFG_DIR/notifiers ]; then
|
||||
mkdir -p $PROVISIONING_CFG_DIR/notifiers
|
||||
cp /usr/share/grafana/conf/provisioning/notifiers/sample.yaml $PROVISIONING_CFG_DIR/notifiers/sample.yaml
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user