#!/usr/bin/env python

import sys
import logging

from systemd_service import Service
from eeg import eeg_stream


if sys.argv[-1] == "systemd":

    daemon = Service("eegstream", "/etc/systemd/system/eegstream.service")
    daemon.create_timer(on_boot_sec=10)


logging.info("Run 'pitoncore systemd' as superuser for create the daemon.")
eeg_stream.run()
