version 0.3.9
[fms.git] / src / fmsapp.cpp
index b30c1ba..8a462e2 100644 (file)
@@ -18,6 +18,7 @@
 #include <Poco/PatternFormatter.h>\r
 #include <iostream>\r
 #include <string>\r
+#include <cstring>\r
 \r
 #ifdef _WIN32\r
        #include <direct.h>\r
@@ -176,6 +177,14 @@ int FMSApp::main(const std::vector<std::string> &args)
        {\r
                logger().information("FMS startup v"FMS_VERSION);\r
 \r
+               std::string tempval="";\r
+               Option::Instance()->Get("VacuumOnStartup",tempval);\r
+               if(tempval=="true")\r
+               {\r
+                       logger().information("VACUUMing database");\r
+                       SQLite3DB::DB::Instance()->Execute("VACUUM;");\r
+               }\r
+\r
                StartThreads();\r
 \r
                if(isInteractive()==true)\r