From a2779f5719627df2f0223fe31c7973cbb72f475c Mon Sep 17 00:00:00 2001
From: Zef Hemel <zef@zef.me>
Date: Thu, 7 Sep 2023 12:38:20 +0200
Subject: [PATCH] store-only -> sync-only flag change

---
 cmd/server.ts      | 8 ++++----
 silverbullet.ts    | 4 ++--
 website/Install.md | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cmd/server.ts b/cmd/server.ts
index 17bec49..187317e 100644
--- a/cmd/server.ts
+++ b/cmd/server.ts
@@ -29,7 +29,7 @@ export async function serveCommand(
     key?: string;
     reindex?: boolean;
     db?: string;
-    storeOnly?: boolean;
+    syncOnly?: boolean;
   },
   folder?: string,
 ) {
@@ -37,7 +37,7 @@ export async function serveCommand(
     "127.0.0.1";
   const port = options.port ||
     (Deno.env.get("SB_PORT") && +Deno.env.get("SB_PORT")!) || 3000;
-  const storeOnly = options.storeOnly || Deno.env.get("SB_STORE_ONLY");
+  const syncOnly = options.syncOnly || Deno.env.get("SB_SYNC_ONLY");
   let dbFile = options.db || Deno.env.get("SB_DB_FILE") || silverBulletDbFile;
 
   const app = new Application();
@@ -85,8 +85,8 @@ To allow outside connections, pass -L 0.0.0.0 as a flag, and put a TLS terminato
   );
 
   let system: System<SilverBulletHooks> | undefined;
-  // system = undefined in storeOnly mode (no PlugOS instance on the server)
-  if (!storeOnly) {
+  // system = undefined in syncOnly mode (no PlugOS instance on the server)
+  if (!syncOnly) {
     // Enable server-side processing
     dbFile = path.resolve(folder, dbFile);
     console.log(
diff --git a/silverbullet.ts b/silverbullet.ts
index e1e12c4..db92f08 100755
--- a/silverbullet.ts
+++ b/silverbullet.ts
@@ -45,8 +45,8 @@ await new Command()
     "Path to TLS key",
   )
   .option(
-    "--store-only",
-    "Run the server as a pure space (file) store only without any backend processing (this disables 'server mode' in the client)",
+    "--sync-only",
+    "Run the server as a pure space (file) store only without any backend processing (this disables 'online mode' in the client)",
   )
   .option(
     "--reindex",
diff --git a/website/Install.md b/website/Install.md
index 050286e..926cfe7 100644
--- a/website/Install.md
+++ b/website/Install.md
@@ -122,7 +122,7 @@ You can configure SB with environment variables instead of flags as well. The fo
 * `SB_PORT`: Sets the port to listen to, e.g. `SB_PORT=1234`
 * `SB_FOLDER`: Sets the folder to expose, e.g. `SB_FOLDER=/space`
 * `SB_AUTH`: Loads an [[Authentication]] database from a (JSON encoded) string, e.g. `SB_AUTH=$(cat /path/to/.auth.json)`
-* `SB_STORE_ONLY`: Runs the server in a "dumb" space store only mode (not indexing content or keeping other state), e.g. `SB_STORE_ONLY=1`
+* `SB_SYNC_ONLY`: Runs the server in a "dumb" space store only mode (not indexing content or keeping other state), e.g. `SB_SYNC_ONLY=1`
 
 ## Using Authelia
 You need to adjust a few configuration options in [[Authelia]] in order for SilverBullet to work as intended.