Skip to content

Commit

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

Signed-off-by: Holger Friedrich <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
  • Loading branch information
holgerfriedrich authored and mstormi committed Jun 10, 2020
1 parent 4641569 commit 5609ca2
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 5609ca2

Please sign in to comment.