This commit is contained in:
root committed 2024-02-28 12:42:50 +02:00
commit 72c4d16448
37 files changed
+1126

No files matched your search

+19
View File
@@ -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"
+7
View File
@@ -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