Skip to content

Commit

Permalink
webadmin fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Code-Egg committed Jun 15, 2020
1 parent 6d3f71b commit 412e1e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/webadmin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ ls_upgrade(){

set_web_admin(){
echo 'Update web admin password.'
local LSADPATH='/usr/local/lsws/admin'
docker-compose exec ${CONT_NAME} su -s /bin/bash lsadm -c \
'echo "admin:$(/usr/local/lsws/admin/fcgi-bin/admin_php* -q /usr/local/lsws/admin/misc/htpasswd.php '${1}')" > /usr/local/lsws/admin/conf/htpasswd';
'if [ -e /usr/local/lsws/admin/fcgi-bin/admin_php ]; then \
echo "admin:$('${LSADPATH}'/fcgi-bin/admin_php -q '${LSADPATH}'/misc/htpasswd.php '${1}')" > '${LSADPATH}'/conf/htpasswd; \
else echo "admin:$('${LSADPATH}'/fcgi-bin/admin_php5 -q '${LSADPATH}'/misc/htpasswd.php '${1}')" > '${LSADPATH}'/conf/htpasswd; \
fi';
}

main(){
Expand Down

0 comments on commit 412e1e9

Please sign in to comment.