#!/bin/bash

# Copyright (C) Metaswitch Networks 2016
# 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.

# Exit codes:
# 0     - Config is synchronized
# 1     - Config is not synchronized
# 2     - Run without root permissions
# Other - An error occurred

. /usr/share/clearwater/utils/check-root-permissions 2

local_site_name=site1
etcd_key=clearwater
. /etc/clearwater/config
/usr/share/clearwater/clearwater-config-manager/scripts/check_config_sync.py "${management_local_ip:-$local_ip}" "$local_site_name" "$etcd_key"
exit $?
