#!/usr/bin/env python

"""
 Copyright European Organization for Nuclear Research (CERN)

 Licensed under the Apache License, Version 2.0 (the "License");
 You may not use this file except in compliance with the License.
 You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0

 Authors:
 - Vitjan Zavrtanik, <vitjan.zavrtanik@gmail.com>, 2017

Sonar distribution daemon makes sure the datasets
are at their respective RSE's.
"""

import signal

from rucio.daemons.sonar_v3.distribution.distribution_daemon import run, stop

if __name__ == "__main__":

    signal.signal(signal.SIGTERM, stop)

    try:
        run()
    except KeyboardInterrupt:
        stop()
