Skip to content

Commit

Permalink
Added: missing script file (was renamed)
Browse files Browse the repository at this point in the history
  • Loading branch information
Micrified committed Jun 2, 2024
1 parent 2d9866c commit a4cb45c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions data/gen_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh
# gen_config: Generate JSON configuration file as a server argument
USAGE="$0 <unixsocket> <username> <password>"

# 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

0 comments on commit a4cb45c

Please sign in to comment.