commit e509155207c671eef877800ec385b59ce9b4cf01 Author: root Date: Tue Feb 22 23:41:47 2022 +0200 1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..cf271f4 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +* + diff --git a/mysql-create-superuser.sh b/mysql-create-superuser.sh new file mode 100755 index 0000000..c8f1f24 --- /dev/null +++ b/mysql-create-superuser.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +PWGEN=`which pwgen` +if [ -z "${PWGEN}" ]; +then + echo "Could not finf \"pwgen\" binary" + exit 1 +fi + +AUTOGEN_PASSWORD=`pwgen -n1 -v 40` +USERNAME="$1" + +if [ -z "${USERNAME}" ]; +then + echo "Missing username" + exit 1 +fi + +cat <