SIEMbitwardendnscrypthome assistantjellyfinjitsimulti-factor authenticationnextcloudonlyofficepiholeraspberry pirocket.chatsyncthingtorwazuhwireguard
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
844 B
12 lines
844 B
#!/bin/bash |
|
|
|
mkdir -p /opt/mistborn_volumes/extra/guacamole/init/ || true |
|
chmod -R +x /opt/mistborn_volumes/extra/guacamole/init/ |
|
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres > /opt/mistborn_volumes/extra/guacamole/init/initdb.sql |
|
|
|
# reset default password in init.db |
|
SALT=$(python3 -c "import secrets; import string; print(f''.join([secrets.choice('0123456789ABCDEF') for x in range(32)]))") |
|
GUAC_PASSWORD_HASHED=$(echo -n "${MISTBORN_DEFAULT_PASSWORD}${SALT}" | sha256sum | awk '{print $1}' | tr a-z A-Z) |
|
|
|
sed -i "s/\'FE24ADC5E11E2B25288D1704ABE67A79E342ECC26064CE69C5B3177795A82264\'/\'$SALT\'/" /opt/mistborn_volumes/extra/guacamole/init/initdb.sql |
|
sed -i "s/\'CA458A7D494E3BE824F5E1E175A1556C0F8EEF2C2D7DF3633BEC4A29C4411960\'/\'$GUAC_PASSWORD_HASHED\'/" /opt/mistborn_volumes/extra/guacamole/init/initdb.sql |