feat: Implement password protection
This commit is contained in:
parent
83369673a0
commit
195c092d52
1 changed files with 10 additions and 0 deletions
10
src/reset.sh
10
src/reset.sh
|
@ -65,6 +65,7 @@ if [ -z "${CPU// /}" ] && grep -qi "model:" <<< "$CPI"; then
|
|||
fi
|
||||
|
||||
CPU="${CPU// CPU/}"
|
||||
CPU="${CPU// 8 Core/}"
|
||||
CPU="${CPU// 16 Core/}"
|
||||
CPU="${CPU// 32 Core/}"
|
||||
CPU="${CPU// 64 Core/}"
|
||||
|
@ -245,6 +246,15 @@ hasDisk() {
|
|||
return 1
|
||||
}
|
||||
|
||||
user="admin"
|
||||
pass="$user"
|
||||
|
||||
[ -n "${USER:-}" ] && user="${USER:-}"
|
||||
[ -n "${PASS:-}" ] && pass="${PASS:-}"
|
||||
|
||||
# Set password
|
||||
echo "$user:{PLAIN}$pass" > /etc/nginx/.htpasswd
|
||||
|
||||
# Start webserver
|
||||
cp -r /var/www/* /run/shm
|
||||
html "Starting $APP for Docker..."
|
||||
|
|
Loading…
Reference in a new issue