mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
/data and /tmp standarization
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
import conf
|
||||
from const import confFileName, logPath
|
||||
from pytz import timezone
|
||||
|
||||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
import json
|
||||
import requests
|
||||
|
||||
# Register NetAlertX directories
|
||||
INSTALL_PATH="/app"
|
||||
INSTALL_PATH = os.getenv("NETALERTX_APP", "/app")
|
||||
sys.path.extend([f"{INSTALL_PATH}/front/plugins", f"{INSTALL_PATH}/server"])
|
||||
|
||||
from plugin_helper import Plugin_Objects, handleEmpty # noqa: E402
|
||||
@@ -14,20 +17,17 @@ from logger import mylog, Logger # noqa: E402
|
||||
from helper import timeNowTZ, get_setting_value, hide_string # noqa: E402
|
||||
from models.notification_instance import NotificationInstance # noqa: E402
|
||||
from database import DB # noqa: E402
|
||||
import conf
|
||||
from const import confFileName, logPath
|
||||
from pytz import timezone
|
||||
|
||||
# Make sure the TIMEZONE for logging is correct
|
||||
conf.tz = timezone(get_setting_value('TIMEZONE'))
|
||||
conf.tz = timezone(get_setting_value("TIMEZONE"))
|
||||
|
||||
# Make sure log level is initialized correctly
|
||||
Logger(get_setting_value('LOG_LEVEL'))
|
||||
Logger(get_setting_value("LOG_LEVEL"))
|
||||
|
||||
pluginName = "PUSHOVER"
|
||||
|
||||
LOG_PATH = logPath + '/plugins'
|
||||
RESULT_FILE = os.path.join(LOG_PATH, f'last_result.{pluginName}.log')
|
||||
LOG_PATH = logPath + "/plugins"
|
||||
RESULT_FILE = os.path.join(LOG_PATH, f"last_result.{pluginName}.log")
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user