mirror of
https://github.com/joglomedia/LEMPer.git
synced 2026-04-05 04:08:19 +00:00
Fix issue #11
This commit is contained in:
@@ -270,9 +270,9 @@ Now, you can reboot your server and enjoy it!"
|
||||
run apt-get autoremove -y
|
||||
|
||||
status -e "\nLEMP stack has been removed completely."
|
||||
warning -e "\nDid you know? that we're sad to see you leave :'(
|
||||
If you are not satisfied with LEMPer stack or
|
||||
have any reasons to uninstall it, please let us know ^^"
|
||||
warning -e "\nDid you know? that e're sad to see you leave :'(
|
||||
If you are not satisfied with LEMPer stack or have
|
||||
any other reasons to uninstall it, please let us know ^^"
|
||||
;;
|
||||
--help)
|
||||
echo "Please read the README file for more information!"
|
||||
|
||||
@@ -464,6 +464,17 @@ function create_account() {
|
||||
run chown -hR "${USERNAME}:${USERNAME}" "/home/${USERNAME}/webapps"
|
||||
fi
|
||||
|
||||
# Add account credentials to /srv/.htpasswd
|
||||
if [[ -n $(command -v mkpasswd) ]]; then
|
||||
local PASSHASH=$(mkpasswd --method=sha-256 "${PASSWORD}")
|
||||
run bash -c 'echo "${USERNAME}:${PASSHASH}" > /srv/.htpasswd'
|
||||
elif [[ -n $(command -v htpasswd) ]]; then
|
||||
run htpasswd -b /srv/.htpasswd "${USERNAME}" "${PASSWORD}"
|
||||
else
|
||||
local PASSHASH=$(openssl passwd -1 "${PASSWORD}")
|
||||
run bash -c 'echo "${USERNAME}:${PASSWORD}" > /srv/.htpasswd'
|
||||
fi
|
||||
|
||||
# Save data to log file.
|
||||
echo "
|
||||
Your default system account information:
|
||||
|
||||
Reference in New Issue
Block a user