fix rebooting issue

like 7e4a25015 but for elasticsearch.
Merge pull request #67 from alphagov/fix-elasticsearch-reboot-issue

fix rebooting issue