Don't use readme for user registrations
This commit is contained in:
parent
3ead78b4f8
commit
5a22bc4785
|
@ -500,15 +500,9 @@ function add_users_after_install {
|
|||
if [[ "$USERNAME" != "$ADMIN_USERNAME" ]]; then
|
||||
if [[ $(user_added_to_app "${USERNAME}" "${app_name}") == "0" ]]; then
|
||||
valstr=$"Login for user ${USERNAME}="
|
||||
if grep -q "${valstr}" /home/${ADMIN_USERNAME}/README; then
|
||||
app_password=$(cat /home/${ADMIN_USERNAME}/README | grep "${valstr}" | head -n 1 | awk -F '=' '{print $2}')
|
||||
else
|
||||
app_password="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
||||
echo "${valstr}${app_password}" >> /home/${ADMIN_USERNAME}/README
|
||||
fi
|
||||
app_password="$(create_password ${MINIMUM_PASSWORD_LENGTH})"
|
||||
add_user_${app_name} "${USERNAME}" "${app_password}"
|
||||
echo "${app_name}_${USERNAME}" >> $APP_USERS_FILE
|
||||
chown ${ADMIN_USERNAME}:${ADMIN_USERNAME} /home/${ADMIN_USERNAME}/README
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue