mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2025-12-06 06:21:36 +01:00
fix: remove obsolete check for signal user file
This commit is contained in:
10
app.py
10
app.py
@@ -6,17 +6,9 @@ def createApp(envivorment=None, start_response=None):
|
|||||||
|
|
||||||
# check files & environment
|
# check files & environment
|
||||||
signal = os.environ.get("SIGNAL_CLI_BIN")
|
signal = os.environ.get("SIGNAL_CLI_BIN")
|
||||||
|
|
||||||
if not os.environ.get("SIGNAL_API_PASS"):
|
if not os.environ.get("SIGNAL_API_PASS"):
|
||||||
print("SIGNAL_API_PASS must be set in enviromenment", file=sys.stderr)
|
print("SIGNAL_API_PASS must be set in enviromenment", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif not os.path.isfile(interface.SIGNAL_USER_FILE):
|
|
||||||
print("{} does not exist.".format(interface.SIGNAL_USER_FILE), file=sys.stderr)
|
|
||||||
sys.exit(1)
|
|
||||||
elif not os.path.getsize(interface.SIGNAL_USER_FILE) > 0:
|
|
||||||
print("{} is empty.".format(interface.SIGNAL_USER_FILE), file=sys.stderr)
|
|
||||||
sys.exit(1)
|
|
||||||
elif not signal or not os.path.isfile(signal):
|
|
||||||
print("SIGNAL_CLI_BIN not set or does not exist.", file=sys.stderr)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
return interface.app
|
return interface.app
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ from sqlalchemy.sql.expression import func
|
|||||||
|
|
||||||
|
|
||||||
HOST = "icinga.atlantishq.de"
|
HOST = "icinga.atlantishq.de"
|
||||||
SIGNAL_USER_FILE = "signal_targets.txt"
|
|
||||||
app = flask.Flask("Signal Notification Gateway")
|
app = flask.Flask("Signal Notification Gateway")
|
||||||
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///sqlite.db"
|
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///sqlite.db"
|
||||||
db = SQLAlchemy(app)
|
db = SQLAlchemy(app)
|
||||||
|
|||||||
Reference in New Issue
Block a user