mirror of
https://github.com/alerta/alerta.git
synced 2025-01-24 17:29:39 +00:00
30 lines
846 B
Python
Executable file
30 lines
846 B
Python
Executable file
#!/usr/bin/env python
|
|
########################################
|
|
#
|
|
# alert-notify - Alert SMS Notifier
|
|
#
|
|
########################################
|
|
|
|
import os
|
|
import sys
|
|
|
|
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
|
os.pardir,
|
|
os.pardir))
|
|
if os.path.exists(os.path.join(possible_topdir, 'alerta', '__init__.py')):
|
|
sys.path.insert(0, possible_topdir)
|
|
|
|
from alerta.common import config
|
|
from alerta.common import log as logging
|
|
from alerta.notify.daemon import NotifyDaemon, Version
|
|
|
|
LOG = logging.getLogger('alerta.notifier')
|
|
CONF = config.CONF
|
|
|
|
if __name__ == '__main__':
|
|
config.parse_args(sys.argv[1:], version=Version)
|
|
logging.setup('alerta')
|
|
notify = NotifyDaemon('alert-notifier')
|
|
notify.start()
|
|
|
|
|