| 116 | |
| 117 | |
| 118 | bool cWebAdmin::Start(void) |
| 119 | { |
| 120 | if (!m_IsInitialized) |
| 121 | { |
| 122 | // Not initialized |
| 123 | return false; |
| 124 | } |
| 125 | |
| 126 | LOGD("Starting WebAdmin..."); |
| 127 | |
| 128 | // Initialize the WebAdmin template script and load the file |
| 129 | m_TemplateScript.Create(); |
| 130 | m_TemplateScript.RegisterAPILibs(); |
| 131 | if (!m_TemplateScript.LoadFile(FILE_IO_PREFIX "webadmin/template.lua")) |
| 132 | { |
| 133 | LOGWARN("Could not load WebAdmin template \"%s\", using default template.", FILE_IO_PREFIX "webadmin/template.lua"); |
| 134 | m_TemplateScript.Close(); |
| 135 | } |
| 136 | |
| 137 | m_IsRunning = m_HTTPServer.Start(*this); |
| 138 | return m_IsRunning; |
| 139 | } |
| 140 | |
| 141 | |
| 142 |
nothing calls this directly
no test coverage detected