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