Skip to content

Commit

Permalink
Grafana installation fixed
Browse files Browse the repository at this point in the history
* race condition due to db migration during installer run, #921

Signed-off-by: Holger Friedrich <[email protected]>
  • Loading branch information
holgerfriedrich committed May 27, 2020
1 parent 918e20c commit f30ced8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions functions/influxdb+grafana.bash
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ grafana_install(){
if [ $FAILED -eq 2 ]; then echo -n "FAILED "; return 2; else echo -n "OK "; fi
cond_echo ""

sleep 2
echo -n "Restarting Grafana... "
cond_redirect systemctl restart grafana-server.service || FAILED=2
if [ $FAILED -eq 2 ]; then echo -n "FAILED "; return 2; else echo -n "OK "; fi
sleep 2

echo -n "Updating Grafana admin password... "
curl --retry 7 --retry-connrefused --user admin:admin --header "Content-Type: application/json" --request PUT --data "{\"password\":\"$1\"}" http://localhost:3000/api/admin/users/1/password || FAILED=2
if [ $FAILED -eq 2 ]; then echo -n "FAILED "; return 2; else echo -n "OK "; fi
Expand Down

0 comments on commit f30ced8

Please sign in to comment.