0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-11-17 12:51:33 -05:00

Bugfix: check return status, not return value

This commit is contained in:
Adrian Dvergsdal 2015-12-16 15:33:12 +01:00
parent 6213664492
commit 55d879419f

View file

@ -44,7 +44,7 @@ function createUser() {
if [ -n "$gid" ]; then
useraddOptions="$useraddOptions --gid $gid"
if [ $(cat /etc/group | cut -d: -f3 | grep -q "$gid") ]; then
if ! $(cat /etc/group | cut -d: -f3 | grep -q "$gid"); then
groupadd --gid $gid $gid
fi
fi