#!/bin/bash

# @file node_identity
#
# Copyright (C) Metaswitch Networks 2015
# If license terms are provided to you in a COPYING file in the root directory
# of the source code repository by which you are accessing this code, then
# the license outlined in that COPYING file applies to your use.
# Otherwise no rights are granted except for those provided to you by
# Metaswitch Networks in a separate written agreement.

# Create a unique identity for the node that is preserved across software
# restarts.

filename=/etc/clearwater/node_identity

if [ ! -e "$filename" ]; then
  uuid=$( python -c "import uuid; print uuid.uuid4()" )
  echo "uuid=$uuid" > $filename
fi

