mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
systemd
This commit is contained in:
parent
2eeae98e97
commit
e5dd1abc3d
@ -9,7 +9,6 @@ COPY ./config/initproxy.conf /data/nginx/proxy_host/
|
||||
#RUN ls /etc/s6-overlay/s6-rc.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
|
||||
|
||||
COPY ./s6/init_user/init_user.sh /app/init_user.sh
|
||||
RUN chmod +x /app/init_user.sh
|
||||
CMD ["/bin/sh", "-c", "/app/init_user.sh && tail -f /dev/null"]
|
@ -2,6 +2,7 @@
|
||||
|
||||
echo "Start to change nginxproxymanage users"
|
||||
|
||||
set +e
|
||||
username="help@websoft9.com"
|
||||
password=$(openssl rand -base64 16 | tr -d '/+' | cut -c1-16)
|
||||
token=""
|
||||
@ -48,3 +49,5 @@ done
|
||||
echo "Save to credential"
|
||||
json="{\"username\":\"$username\",\"password\":\"$password\"}"
|
||||
echo "$json" > "$cred_path"
|
||||
|
||||
set -e
|
@ -9,14 +9,12 @@ counter=1
|
||||
portainer_username="admin"
|
||||
|
||||
copy_credential() {
|
||||
|
||||
source_container=$1
|
||||
source_path=$2
|
||||
destination_container=$3
|
||||
destination_path=$4
|
||||
|
||||
if docker exec "$destination_container" [ -f "$destination_path" ]; then
|
||||
printf "%s already exists\n" "$destination_path"
|
||||
else
|
||||
temp_file=$(mktemp)
|
||||
docker cp "$source_container:$source_path" "$temp_file"
|
||||
|
||||
@ -33,7 +31,7 @@ copy_credential() {
|
||||
fi
|
||||
|
||||
rm -f "$temp_file"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
while true; do
|
||||
|
Loading…
Reference in New Issue
Block a user