Skip to content

Instantly share code, notes, and snippets.

@Callonski
Created July 19, 2020 08:07
Show Gist options
  • Save Callonski/3534800f38371b5eb6ed575bb9846ab9 to your computer and use it in GitHub Desktop.
Save Callonski/3534800f38371b5eb6ed575bb9846ab9 to your computer and use it in GitHub Desktop.
#! /bin/bash
FILE=/usr/share/elasticsearch/credentials.json
if [ -f "$FILE" ]; then
echo "$FILE exist"
exit 0
fi
@ajaysamant
Copy link

How is this file deployed on machine?

@CalleEngene
Copy link

This snippet just checks if it's the first time the machine is starting by checking if the credentials file is already created. If it is, we don't want to re-run the scripts since everything is already configured. So we just exit the scritp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment