from daemon.service import main_loop
from daemon.log import log
import os
import time
import signal

shouldIrun = True

def main():


	def programCleanup(_signo, _stack_frame):
		log.info('Recibida la señal de salida')
		shouldIrun = False

	signal.signal(signal.SIGTERM, programCleanup)

	run(shouldIrun)
	log.info('Terminando Correctamente')

if __name__ == '__main__':
	main()
