From 0c62275c95cbf5c01ef3d3cafe2452196c64b410 Mon Sep 17 00:00:00 2001 From: iamromulan <50184035+iamromulan@users.noreply.github.com> Date: Sat, 13 Apr 2024 23:25:55 -0400 Subject: [PATCH] Move .htpasswd to /opt/etc --- RMxxx_rgmii_toolkit.sh | 6 +++--- simpleadmin/lighttpd.conf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RMxxx_rgmii_toolkit.sh b/RMxxx_rgmii_toolkit.sh index c0599d3..f4db4b9 100644 --- a/RMxxx_rgmii_toolkit.sh +++ b/RMxxx_rgmii_toolkit.sh @@ -290,15 +290,15 @@ configure_simple_firewall() { } set_simpleadmin_passwd(){ + ensure_entware_installed while true; do echo -e "\e[1;31mPlease set your simpleadmin (User: admin) web login password.\e[0m" read -s password if [ -z "$password" ]; then echo -e "\e[1;32mNo password provided.\e[0m" else - mkdir $SIMPLE_ADMIN_DIR > /dev/null 2>&1 - echo -n "admin:" > $SIMPLE_ADMIN_DIR/.htpasswd - openssl passwd -crypt "$password" >> $SIMPLE_ADMIN_DIR/.htpasswd + echo -n "admin:" > /opt/etc/.htpasswd + openssl passwd -crypt "$password" >> /opt/etc/.htpasswd echo -e "\e[1;32mPassword set.\e[0m" break fi diff --git a/simpleadmin/lighttpd.conf b/simpleadmin/lighttpd.conf index 7f38c2d..ad22369 100644 --- a/simpleadmin/lighttpd.conf +++ b/simpleadmin/lighttpd.conf @@ -14,7 +14,7 @@ server.document-root = "/usrdata/simpleadmin/www" index-file.names = ( "index.html" ) auth.backend = "htpasswd" -auth.backend.htpasswd.userfile = "/usrdata/simpleadmin/.htpasswd" +auth.backend.htpasswd.userfile = "/opt/etc/.htpasswd" $SERVER["socket"] == "0.0.0.0:443" { ssl.engine = "enable"