// returns true if DB was running static bool shutDownDB(S dbID) { RemoteDB db = connectToDBOpt(dbID); if (db != null) { print("Shutting down DB " + dbID + "..."); try { db.xshutdown(); } catch e { print("Possibly OK: " + exceptionToStringShort(e)); } db.close(); if (dbRunning(dbID)) { sleepSeconds(5); if (dbRunning(dbID)) fail("Could not should down DB " + dbID); } print("DB shut down."); true; } else { print("DB not running."); false; } }