From e67bb7f431e275b5313ff412266905dc1499294a Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 31 Aug 2014 15:03:23 +0200 Subject: WebAdmin: Stop webadmin if template can't load. --- src/WebAdmin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index 0646c9d1c..35a6d401c 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -131,8 +131,10 @@ bool cWebAdmin::Start(void) m_TemplateScript.RegisterAPILibs(); if (!m_TemplateScript.LoadFile(FILE_IO_PREFIX "webadmin/template.lua")) { - LOGWARN("Could not load WebAdmin template \"%s\", using default template.", FILE_IO_PREFIX "webadmin/template.lua"); + LOGERROR("Could not load WebAdmin template \"%s\". WebAdmin disabled!", FILE_IO_PREFIX "webadmin/template.lua"); m_TemplateScript.Close(); + m_HTTPServer.Stop(); + return false; } if (!LoadLoginTemplate()) -- cgit v1.2.3