mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
Fix build (#286)
The Refactoring of the scripts 'addmailuser' and 'delmailuser' destroyed the build process.
This commit is contained in:
parent
61cf0bfc6f
commit
69ee54513e
|
@ -17,12 +17,13 @@ if [ ! -z "$1" ]; then
|
||||||
PASS="$2"
|
PASS="$2"
|
||||||
else
|
else
|
||||||
read -s -p "Enter Password: " PASS
|
read -s -p "Enter Password: " PASS
|
||||||
if [ -z "$PASS" ]; then
|
if [ -z "$PASS" ]; then
|
||||||
echo "Password can't be empty"
|
echo "Password can't be empty"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
ENTRY=$(echo "$USER|$(doveadm pw -s SHA512-CRYPT -u "$USER" -p "$PASS")")
|
fi
|
||||||
echo "$ENTRY" >> $DATABASE
|
ENTRY=$(echo "$USER|$(doveadm pw -s SHA512-CRYPT -u "$USER" -p "$PASS")")
|
||||||
|
echo "$ENTRY" >> $DATABASE
|
||||||
else
|
else
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,13 +4,10 @@ DATABASE=/tmp/docker-mailserver/postfix-accounts.cf
|
||||||
|
|
||||||
function usage {
|
function usage {
|
||||||
echo "Usage: delmailuser <user@domain.tld>"
|
echo "Usage: delmailuser <user@domain.tld>"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -z "$1" ]; then
|
if [ ! -z "$1" ]; then
|
||||||
USER=$1
|
|
||||||
ENTRIES=$(grep "$USER" -vi $DATABASE)
|
|
||||||
echo "$ENTRIES" > $DATABASE
|
|
||||||
USER=$1
|
USER=$1
|
||||||
if [ -f "$DATABASE" ]; then
|
if [ -f "$DATABASE" ]; then
|
||||||
ENTRIES=$(grep "$USER" -vi $DATABASE)
|
ENTRIES=$(grep "$USER" -vi $DATABASE)
|
||||||
|
|
Loading…
Reference in a new issue