Skip to content

Commit

Permalink
delete extra stop method that actually blockec the real stop method
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronosec committed Nov 3, 2023
1 parent 6af4257 commit 8468fb0
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tikuna/sensor/sensor_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,26 @@ def __init__(self, pidfile, stdin='/dev/null',
def run(self):
logging.basicConfig(filename=log_file,
level=logging.INFO)
logging.info('Creating tikuna client services...')
logging.info('Creating Tikuna client service...')
self.log_sensor_service = LogSensor("prysm-beacon")
# Start the services.
logging.info('Starting the tikuna client services...')
logging.info('Starting the Tikuna client service...')
self.log_sensor_service.start()
logging.info("Sensors started.")
logging.info('tikuna service client started...')

def stop(self):
if self.log_sensor_service is not None:
self.log_sensor_service.stop()
logging.info('Service tikuna stopped ...')
logging.info('Tikuna service client started...')

if __name__ == "__main__":
daemon = SensorDaemon( pid_file,
stdout=log_file,
stderr=log_file)
if len(sys.argv) == 2:
if 'start' == sys.argv[1]:
logging.info('Starting Tikuna sensor service...')
daemon.start()
elif 'stop' == sys.argv[1]:
logging.info('Stoping Tikuna sensor service...')
daemon.stop()
elif 'restart' == sys.argv[1]:
logging.info('Restarting Tikuna sensor service...')
daemon.restart()
else:
print("Unknown command")
Expand Down

0 comments on commit 8468fb0

Please sign in to comment.