From 0d10205772b2745356969176de6f52510527e5a6 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 4 Jan 2024 20:45:39 +0100 Subject: Add more scripts --- bin/extra/mariadb-adduser | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 bin/extra/mariadb-adduser (limited to 'bin/extra/mariadb-adduser') diff --git a/bin/extra/mariadb-adduser b/bin/extra/mariadb-adduser new file mode 100755 index 0000000..d4e1b45 --- /dev/null +++ b/bin/extra/mariadb-adduser @@ -0,0 +1,25 @@ +#!/bin/sh +if [ "$(id -u)" -ne 0 ] +then + >&2 printf "Not root.\n" + exit 1 +fi + +printf 'name? ' +name="$(head -n 1)" +printf 'password? ' +password="$(head -n 1)" +printf 'database? ' +database="$(head -n 1)" + +( + cat <