Add execution of the start script for Postgres
@@ -49,6 +49,14 @@ PLUGIN_HANDLE plugin_init()
{
ConnectionManager *manager = ConnectionManager::getInstance();
+ // Start the postgres server if it is not already running
+ char *home = getenv("FOGLAMP_HOME");
+ if (! home)
+ home = (char *)"/usr/local/foglamp";
+ char buf[256];
+ snprintf(buf, sizeof(buf), "%s/scripts/plugins/storage/postgres start", home);
+ system(buf);
+
manager->growPool(5);
return manager;
}
