From a4cb45c4c13fae9ac8594c7b24a3d657919d46b0 Mon Sep 17 00:00:00 2001 From: Micrified Date: Sun, 2 Jun 2024 14:00:08 +0200 Subject: [PATCH] Added: missing script file (was renamed) --- data/gen_config.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 data/gen_config.sh diff --git a/data/gen_config.sh b/data/gen_config.sh new file mode 100644 index 0000000..c056168 --- /dev/null +++ b/data/gen_config.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# gen_config: Generate JSON configuration file as a server argument +USAGE="$0 " + +# Argument check +if [ "$#" -ne "3" ]; then + echo $USAGE 1>&2; exit 1; +fi + +cat << EOF +{ + "Auth" : { + "Base" : 2, + "Factor" : 2, + "Limit" : 8, + "Retry" : 3 + }, + "Database" : { + "UnixSocket" : "$1", + "Username" : "$2", + "Password" : "$3", + "Database" : "main" + }, + "Host" : "localhost", + "Port" : "3070" +} +EOF + +exit 0