mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-13 20:52:54 +01:00
[refactor] Move collect_webuser_inputs to so-functions
This commit is contained in:
@@ -291,6 +291,29 @@ clear_master() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
collect_webuser_inputs() {
|
||||||
|
# Get a password for the web admin user
|
||||||
|
VALIDUSER=no
|
||||||
|
while [ $VALIDUSER != yes ]; do
|
||||||
|
whiptail_create_web_user
|
||||||
|
if so-user valemail "$WEBUSER"; then
|
||||||
|
VALIDUSER=yes
|
||||||
|
else
|
||||||
|
whiptail_invalid_user_warning
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
WPMATCH=no
|
||||||
|
while [ $WPMATCH != yes ]; do
|
||||||
|
whiptail_create_web_user_password1
|
||||||
|
if echo "$WEBPASSWD1" | so-user valpass; then
|
||||||
|
whiptail_create_web_user_password2
|
||||||
|
check_web_pass
|
||||||
|
else
|
||||||
|
whiptail_invalid_pass_warning
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
configure_minion() {
|
configure_minion() {
|
||||||
|
|
||||||
# You have to pass the TYPE to this function so it knows if its a master or not
|
# You have to pass the TYPE to this function so it knows if its a master or not
|
||||||
|
|||||||
@@ -249,31 +249,6 @@ if (whiptail_you_sure) ; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function collect_webuser_inputs() {
|
|
||||||
# Get a password for the web admin user
|
|
||||||
VALIDUSER=no
|
|
||||||
while [ $VALIDUSER != yes ]; do
|
|
||||||
whiptail_create_web_user
|
|
||||||
so-user valemail "$WEBUSER"
|
|
||||||
if [ $? == 0 ]; then
|
|
||||||
VALIDUSER=yes
|
|
||||||
else
|
|
||||||
whiptail_invalid_user_warning
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
WPMATCH=no
|
|
||||||
while [ $WPMATCH != yes ]; do
|
|
||||||
whiptail_create_web_user_password1
|
|
||||||
echo "$WEBPASSWD1" | so-user valpass
|
|
||||||
if [ $? == 0 ]; then
|
|
||||||
whiptail_create_web_user_password2
|
|
||||||
check_web_pass
|
|
||||||
else
|
|
||||||
whiptail_invalid_pass_warning
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
## Master ##
|
## Master ##
|
||||||
|
|||||||
Reference in New Issue
Block a user