Browse Source

passwd.sh

merge-requests/70/head
Steven Foerster 5 years ago
parent
commit
995a785c17
  1. 8
      scripts/install.sh
  2. 19
      scripts/subinstallers/passwd.sh

8
scripts/install.sh

@ -59,13 +59,7 @@ echo -e "| | | | \__ \ |_| |_) | (_) | | | | | |" @@ -59,13 +59,7 @@ echo -e "| | | | \__ \ |_| |_) | (_) | | | | | |"
echo -e "|_| |_|_|___/\__|_.__/ \___/|_| |_| |_|"
echo -e ""
# INPUT default admin password
if [ -z "${MISTBORN_DEFAULT_PASSWORD}" ]; then
read -p "(Mistborn) Set default admin password: " -s MISTBORN_DEFAULT_PASSWORD
echo
else
echo "MISTBORN_DEFAULT_PASSWORD is already set"
fi
source ./scripts/subinstallers/passwd.sh
# Install Cockpit?
if [ -z "${MISTBORN_INSTALL_COCKPIT}" ]; then

19
scripts/subinstallers/passwd.sh

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
#!/bin/bash
# INPUT default admin password
while [ -z "${MISTBORN_DEFAULT_PASSWORD}" ]; do
echo "(Mistborn) The default admin password may only container alphanumeric characters and _"
read -p "(Mistborn) Set default admin password: " -s MISTBORN_DEFAULT_PASSWORD
echo
if [[ $s =~ ^[A-Za-z_]+$ ]]; then
# it matches
echo "(Mistborn) Password is accepted"
else
unset MISTBORN_DEFAULT_PASSWORD
echo "(Mistborn) Try again"
fi
done
echo "MISTBORN_DEFAULT_PASSWORD is set"
Loading…
Cancel
Save