This commit is contained in:
qiaofeng1227 2023-09-22 15:20:36 +08:00
parent 34cd152897
commit dbae71c66a
2 changed files with 5 additions and 2 deletions

View File

@ -8,4 +8,5 @@ COPY ./config/initproxy.conf /data/nginx/proxy_host/
COPY ./s6/init_user /etc/s6-overlay/s6-rc.d/init_user COPY ./s6/init_user /etc/s6-overlay/s6-rc.d/init_user
RUN ls /etc/s6-overlay/s6-rc.d/init_user RUN ls /etc/s6-overlay/s6-rc.d/init_user
RUN touch /etc/s6-overlay/s6-rc.d/user/contents.d/init_user RUN touch /etc/s6-overlay/s6-rc.d/user/contents.d/init_user
RUN chmod -R 755 /etc/s6-overlay/s6-rc.d/init_user RUN chmod -R 755 /etc/s6-overlay/s6-rc.d/init_user

View File

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
echo "Start to change nginxproxymanage users" >> /tmp/userlog
sleep 60
username="help@websoft9.com" username="help@websoft9.com"
password=$(openssl rand -base64 16 | tr -d '/+' | cut -c1-16) password=$(openssl rand -base64 16 | tr -d '/+' | cut -c1-16)
token="" token=""
@ -13,8 +17,6 @@ fi
echo "create diretory" echo "create diretory"
mkdir -p "$(dirname "$cred_path")" mkdir -p "$(dirname "$cred_path")"
echo "Start to change nginxproxymanage users" >> /tmp/userlog
while [ -z "$token" ]; do while [ -z "$token" ]; do
sleep 5 sleep 5
login_data=$(curl -X POST -H "Content-Type: application/json" -d '{"identity":"admin@example.com","scope":"user", "secret":"changeme"}' http://localhost:81/api/tokens) login_data=$(curl -X POST -H "Content-Type: application/json" -d '{"identity":"admin@example.com","scope":"user", "secret":"changeme"}' http://localhost:81/api/tokens)