mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Fix some bugs in the shell scripts.
This commit is contained in:
parent
e4d70d5147
commit
133d6eba32
|
@ -3,7 +3,7 @@
|
|||
DATABASE=/tmp/docker-mailserver/postfix-accounts.cf
|
||||
|
||||
function usage {
|
||||
echo Usage: addmailuser <user@domain.tld> [password]
|
||||
echo 'Usage: addmailuser <user@domain.tld> [password]'
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ if [ ! -z "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
if [ ! -z "$2" ]; then
|
||||
PASS=$2
|
||||
PASS="$2"
|
||||
else
|
||||
read -s -p "Enter Password: " PASS
|
||||
if [ -z "$PASS" ]; then
|
||||
|
@ -22,7 +22,7 @@ if [ ! -z "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
ENTRY=$(echo "$USER|$(doveadm pw -s SHA512-CRYPT -u $USER -p $PASS)")
|
||||
ENTRY=$(echo "$USER|$(doveadm pw -s SHA512-CRYPT -u "$USER" -p "$PASS")")
|
||||
echo "$ENTRY" >> $DATABASE
|
||||
else
|
||||
usage
|
||||
|
|
0
target/bin/generate-dkim-config
Normal file → Executable file
0
target/bin/generate-dkim-config
Normal file → Executable file
3
target/bin/generate-ssl-certificate
Normal file → Executable file
3
target/bin/generate-ssl-certificate
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
FQDN=$(hostname)
|
||||
FQDN=$(hostname --fqdn)
|
||||
|
||||
cd /ssl
|
||||
# Create CA certificate
|
||||
|
@ -11,4 +11,3 @@ openssl req -new -nodes -keyout /ssl/$FQDN-key.pem -out /ssl/$FQDN-req.pem -days
|
|||
openssl ca -out /ssl/$FQDN-cert.pem -infiles /ssl/$FQDN-req.pem
|
||||
# Combine certificates for courier
|
||||
cat /ssl/$FQDN-key.pem /ssl/$FQDN-cert.pem > /ssl/$FQDN-combined.pem
|
||||
|
||||
|
|
Loading…
Reference in a new issue