If password not specified
This commit is contained in:
parent
0d8b67f81a
commit
7ce6a52d0e
|
@ -96,14 +96,17 @@ function add_user_irc_bouncer {
|
|||
|
||||
read_config_param IRC_PORT
|
||||
read_config_param DEFAULT_DOMAIN_NAME
|
||||
read_config_param IRC_PASSWORD
|
||||
if [ ! $2 ]; then
|
||||
read_config_param IRC_PASSWORD
|
||||
new_user_password="$IRC_PASSWORD"
|
||||
fi
|
||||
|
||||
stop_irc_bouncer
|
||||
|
||||
new_user_salt_base1="$(create_password 20)"
|
||||
new_user_salt_base2=$(echo "$new_user_salt_base1" | sed "s|#|.|g")
|
||||
new_user_salt=$(echo "$new_user_salt_base2" | sed "s|#|.|g")
|
||||
new_user_hash=$(echo "${new_username}${new_user_password}${new_user_salt}" | sha256sum | awk -F ' ' '{print $1}')
|
||||
new_user_hash=$(echo "${new_user_password}${new_user_salt}" | sha256sum | awk -F ' ' '{print $1}')
|
||||
|
||||
echo "<User ${new_username}>" >> /home/znc/.znc/configs/znc.conf
|
||||
#new_user_pass="sha256#${new_user_hash}#${new_user_salt}#"
|
||||
|
|
Loading…
Reference in New Issue