From b69092d732b8a955ebb25b8ce943ada2d5685e5e Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Sun, 18 Dec 2022 20:24:33 -0800 Subject: [PATCH] :memo: command line arguments example --- docs/building.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/building.md b/docs/building.md index 2e9108c..4278322 100644 --- a/docs/building.md +++ b/docs/building.md @@ -5,8 +5,8 @@ as CCash is very lightweight it can run on practically any device but here are some tips: * single core machines should toggle `MULTI_THREADED` to `false` * if your server is sufficiently active, such that each time save frequency is met, changes having been made is highly likely then `CONSERVATIVE_DISK_SAVE` should be toggled to `false` -* `MAX_LOG_SIZE` should be adjusted as it takes up the most memory usage/storage of the ledger's features at 157 bytes in memory and 43 bytes in disk at default settings on the current version, so 6678 logs per Mb of RAM. Setting to 0 will disable logs -* with no users memory usage is ~8.47 Mb +* `MAX_LOG_SIZE` should be adjusted as it takes up the most memory usage/storage of the ledger's features at 157 bytes in memory and 43 bytes in disk at default settings on the current version, so 6678 logs per MB of RAM. Setting to 0 will disable logs +* with no users memory usage is ~8.47 MB * saving frequency being set to 0 will disable frequency saving and only save on close * make backups of your save files! @@ -95,6 +95,7 @@ cmake .. make -j sudo ./bank ``` +the last command generates a blank save file in your defined location. ## Certs make sure to edit `config.json` adding the certificate location if you're using HTTPS, I personally use [certbot](https://certbot.eff.org/). @@ -144,4 +145,15 @@ leaving ] } ``` -**it is Highly recommened you secure your server** + +You can now run the program from the build location. For example +``` +sudo ./bank admin 5 +``` +in this example CCash will be launched with the admin account named `"admin"`, and a saving frequency of every `5` minutes; without daemon being given its default is `false`. + +Another example +``` +sudo ./bank Kevin 0 true +``` +in this example CCash will be launched with the admin account named `"Kevin"`, and a saving frequency of `0` meaning the server will only save when closed; daemon is set to `true` and so will be launched in the background.