Skip to content
Snippets Groups Projects
Commit f512f79f authored by Bob Mottram's avatar Bob Mottram
Browse files

Check that password exists

parent 31b351d3
No related branches found
No related tags found
No related merge requests found
......@@ -525,8 +525,8 @@ function web_admin_setup_login {
# create a password file used by nginx
echo -n "$webadmin_password" | htpasswd -i -s -c /etc/nginx/.webadminpasswd "admin"
if [ ! -f /etc/nginx/.webadminpasswd ]; then
echo $'/etc/nginx/.webadminpasswd not found'
if ! grep -q 'admin:' /etc/nginx/.webadminpasswd; then
echo $'/etc/nginx/.webadminpasswd password not created for admin'
exit 2428956
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment