mirror of
https://github.com/iFargle/headscale-webui.git
synced 2026-01-04 11:43:41 +01:00
Test
This commit is contained in:
@@ -156,11 +156,14 @@ def startup_checks():
|
||||
if os.access('/etc/headscale/config.yaml', os.R_OK):
|
||||
app.logger.warning("/etc/headscale/config.yaml: READ: PASS")
|
||||
config_readable = True
|
||||
if os.access('/etc/headscale/config.yml', os.R_OK):
|
||||
elif os.access('/etc/headscale/config.yml', os.R_OK):
|
||||
app.logger.warning("/etc/headscale/config.yml: READ: PASS")
|
||||
config_readable = True
|
||||
else: checks_passed = False
|
||||
|
||||
if checks_passed: return "Pass"
|
||||
if checks_passed:
|
||||
app.logger.warning("All startup checks passed.")
|
||||
return "Pass"
|
||||
|
||||
messageHTML = ""
|
||||
# Generate the message:
|
||||
|
||||
@@ -38,7 +38,9 @@ app.logger.warning("BASE_PATH: "+BASE_PATH)
|
||||
@app.route(BASE_PATH+'/overview')
|
||||
def overview_page():
|
||||
# General error checks. See the function for more info:
|
||||
if helper.startup_checks() != "Pass": return redirect(BASE_PATH+url_for('error_page'))
|
||||
if helper.startup_checks() != "Pass":
|
||||
app.logger.debug("Why does this fail? Return value: "+helper.startup_checks())
|
||||
return redirect(BASE_PATH+url_for('error_page'))
|
||||
# If the API key fails, redirect to the settings page:
|
||||
if not helper.key_test(): return redirect(BASE_PATH+url_for('settings_page'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user