call ensure_postgres_running

Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
diff --git a/xos/scripts/opencloud b/xos/scripts/opencloud
index 910c966..4a82c03 100755
--- a/xos/scripts/opencloud
+++ b/xos/scripts/opencloud
@@ -182,6 +182,7 @@
 fi
 if [ "$COMMAND" = "resetdb" ]; then
     stopserver
+    ensure_postgres_running
     dropdb
     createdb
     syncdb
@@ -211,4 +212,4 @@
    remigrate
    createdb
    syncdb
-fi
\ No newline at end of file
+fi