Development
This commit is contained in:
parent
ce280b6d7a
commit
337c0daf22
3 changed files with 10 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ from datetime import datetime, timezone
|
|||
from flask import session
|
||||
|
||||
APP_DIR = _os.path.dirname(_os.path.abspath(__file__))
|
||||
CONFIGS_DIR = '/routlin_location'
|
||||
CONFIGS_DIR = _settings.routlin_location()
|
||||
DATA_DIR = '/data'
|
||||
WWW_DIR = '/www'
|
||||
ACCOUNTS_DB = f'{DATA_DIR}/.dashboard-accounts'
|
||||
|
|
|
|||
|
|
@ -14,8 +14,15 @@ def is_production():
|
|||
return not os.environ.get('DEV_MODE', '').lower() in ('1', 'true', 'yes')
|
||||
|
||||
|
||||
def routlin_location():
|
||||
return os.environ.get('ROUTLIN_LOCATION', '/routlin_location')
|
||||
|
||||
|
||||
def is_pro():
|
||||
return bool(os.environ.get('LICENSE', '').strip())
|
||||
try:
|
||||
return bool(open(f'{routlin_location()}/.license').read().strip())
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
|
||||
def get_host_utc_offset():
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import copy, json, os
|
||||
|
||||
CONFIGS_DIR = '/routlin_location'
|
||||
CONFIGS_DIR = os.environ.get('ROUTLIN_LOCATION', '/routlin_location')
|
||||
CONFIG_FILE = f'{CONFIGS_DIR}/config.json'
|
||||
CAPTIVE_QUEUE = f'{CONFIGS_DIR}/.captive-queue'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue