summaryrefslogtreecommitdiffstats
path: root/source/Root.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Root.cpp')
-rw-r--r--source/Root.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/Root.cpp b/source/Root.cpp
index 52a0f46ce..1ec7f0e59 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -125,13 +125,19 @@ void cRoot::Start(void)
IniFile.WriteFile();
cIniFile WebIniFile("webadmin.ini");
- if( WebIniFile.ReadFile() )
+ if (!WebIniFile.ReadFile())
{
- if (WebIniFile.GetValueB("WebAdmin", "Enabled", false ))
- {
- LOG("Creating WebAdmin...");
- m_WebAdmin = new cWebAdmin(8080);
- }
+ LOGINFO("webadmin.ini inaccessible, using webadmin.example.ini for defaults!");
+ WebIniFile.Path("webadmin.example.ini");
+ WebIniFile.ReadFile();
+ WebIniFile.Path("webadmin.ini");
+ WebIniFile.WriteFile();
+ }
+
+ if (WebIniFile.GetValueB("WebAdmin", "Enabled", false ))
+ {
+ LOG("Creating WebAdmin...");
+ m_WebAdmin = new cWebAdmin(8080);
}
LOG("Loading settings...");