mmv

mailserver bootstrap script
git clone git://git.yotsev.xyz/mmv.git
Log | Files | Refs | README | LICENSE

commit f2e868961ec59807df54f56e21a1d96fc87671b9
parent 21a4543a5f9a075dffd5d463f43e514d9ca303ea
Author: Petar Yotsev <petar@yotsev.xyz>
Date:   Tue, 14 Dec 2021 12:11:07 +0000

Fix more if statements

Diffstat:
Mfiles/madduser | 2+-
Mfiles/mdeluser | 8+++++---
Mfiles/mpasswd | 8+++++---
3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/files/madduser b/files/madduser @@ -1,6 +1,6 @@ #!/bin/sh -if [ $# != 2 ] then +if [ $# != 2 ]; then echo "Error: Invalid number of arguments" echo "Usage: madduser DOMAIN USERNAME" return 1 diff --git a/files/mdeluser b/files/mdeluser @@ -1,8 +1,10 @@ #!/bin/sh -[ $# != 2 ] && -echo "Error: Invalid number of arguments" && -echo "Usage: mdeluser DOMAIN USERNAME" +if [ $# != 2 ]; then + echo "Error: Invalid number of arguments" + echo "Usage: madduser DOMAIN USERNAME" + return 1 +fi domain=$1 user=$2 diff --git a/files/mpasswd b/files/mpasswd @@ -1,8 +1,10 @@ #!/bin/sh -[ $# != 2 ] && -echo "Error: Invalid number of arguments" && -echo "Usage: mpasswd DOMAIN USERNAME" +if [ $# != 2 ]; then + echo "Error: Invalid number of arguments" + echo "Usage: madduser DOMAIN USERNAME" + return 1 +fi domain=$1 user=$2