add dump/restore feature and set new version to 4.2.0
[brisk.git] / web / Obj / sac-a-push.phh
index 5d62a37..3f5c4c1 100644 (file)
@@ -545,6 +545,14 @@ class Sac_a_push {
                                 if ($line == "reload") {
                                     require("$DOCUMENT_ROOT/Etc/".BRISK_CONF);
                                 }
+                                else if ($line == "shutdown") {
+                                    if ($this->app->dump_data()) {
+                                        exit(0);
+                                    }
+                                    else {
+                                        exit(1);
+                                    }
+                                }
                             }
                             else {
                                 $key = array_search("$sock", $this->socks);