Fix Post-Installation Script & Add Stalwart-CLI To The Deb Package

This commit is contained in:
Cantibra
2026-01-27 14:10:24 +01:00
parent 6691607a80
commit d9b4bf5e0f
4 changed files with 110 additions and 32 deletions

View File

@@ -31,8 +31,8 @@ case "${1}" in
if ! /usr/bin/grep --quiet "secret =" '/etc/stalwart.toml'; then
PASSWORD=$(/usr/bin/openssl rand -base64 '18')
PASSWORD_SHA512=$(/usr/bin/echo "${PASSWORD}" | /usr/bin/openssl passwd -noverify -stdin -quiet -6)
/usr/bin/echo "secret = \"${PASSWORD_SHA512}\"" > '/etc/stalwart.toml'
/ust/bin/chown 'stalwart' '/etc/stalwart.toml'
/usr/bin/echo "secret = \"${PASSWORD_SHA512}\"" >> '/etc/stalwart.toml'
/usr/bin/chown 'stalwart' '/etc/stalwart.toml'
/usr/bin/echo '##'
/usr/bin/echo '##'
/usr/bin/echo '## User: root '