1
This commit is contained in:
commit
72c4d16448
37 files changed
+1126
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
USERNAME="admin"
|
||||
PASSWORD="$1"
|
||||
if [ -z "\${PASSWORD}" ]; then
|
||||
echo -e "\\nPlease call '\$0 <password>' to run this command!\\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
which htpasswd
|
||||
if [ "$?" -gt "0" ]
|
||||
then
|
||||
PASS=$(docker run --entrypoint htpasswd httpd:2 -bn -B ${USERNAME} ${PASSWORD} | cut -d ":" -f 2 )
|
||||
else
|
||||
PASS=$(htpasswd -nb -B admin ${PASSWORD} | cut -d ":" -f 2)
|
||||
fi
|
||||
|
||||
echo "plaintext encryption: ${PASS}"
|
||||
echo "docker-compse.yml escaped: ${PASS}"|sed -e "s@\\\$@\\\$\\\$@g"
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
docker-compose down
|
||||
|
||||
docker run --rm -v portainer_data:/data/ portainer/helper-reset-password
|
||||
|
||||
docker-compose up -d
|
||||
Reference in new issue
Block a user