You've already forked Vaultwarden
Inital Commit
This commit is contained in:
30
root/usr/lib/vaultwarden/email_header_logo
Normal file
30
root/usr/lib/vaultwarden/email_header_logo
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
###
|
||||
#
|
||||
# Options Section
|
||||
#
|
||||
###
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
|
||||
###
|
||||
#
|
||||
# Runtime Environment
|
||||
#
|
||||
###
|
||||
|
||||
HEADER='/usr/lib/vaultwarden/templates/email/email_header.hbs'
|
||||
IMAGE='/etc/vaultwarden/email_logo.png'
|
||||
WIDTH=$(/usr/bin/exiftool -s -s -s -ImageWidth "${IMAGE}")
|
||||
HEIGHT=$(/usr/bin/exiftool -s -s -s -ImageHeight "${IMAGE}")
|
||||
BASE64=$(/usr/bin/base64 --wrap='0' "${IMAGE}")
|
||||
BASE64="data:image/bmp;base64,${BASE64}"
|
||||
/usr/bin/sed --in-place --expression="s|src=\"data:image/[^\"]*\"|src=\"${BASE64}\"|g" "${HEADER}" || true
|
||||
/usr/bin/sed --in-place --expression="s|width=\"[0-9]*\"|width=\"${WIDTH}\"|g" "${HEADER}" || true
|
||||
/usr/bin/sed --in-place --expression="s|height=\"[0-9]*\"|height=\"${HEIGHT}\"|g" "${HEADER}" || true
|
||||
exit 0
|
||||
Reference in New Issue
Block a user