Fixed a silly bug
This commit is contained in:
parent
8669f5f8aa
commit
e26387bb4c
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
SLBRUSER=$1
|
||||
test -z "$SLBRUSER" && echo "no user provided" && exit
|
||||
grep -qv "$SLBRUSER" users.txt && echo "user not found in users.txt, will not delete" && exit
|
||||
grep -qvx "$SLBRUSER" users.txt && echo "user not found in users.txt, will not delete" && exit
|
||||
|
||||
if ps -o stat= -p $PPID | grep -qv S+ #check if this is being called from listen.py
|
||||
then
|
||||
|
|
|
@ -5,7 +5,7 @@ test -z "$SLBRUSER" && echo "no user provided" && exit
|
|||
test -z "$PUBKEY" && echo "no key provided" && exit
|
||||
PUBKEY="$(cat "$PUBKEY")"
|
||||
|
||||
cut -d: -f1 /etc/passwd | grep -q "$SLBRUSER" && echo "user already exists" && exit
|
||||
cut -d: -f1 /etc/passwd | grep -qx "$SLBRUSER" && echo "user already exists" && exit
|
||||
|
||||
echo "Creating homedir..."
|
||||
mkdir "/home/slbr/$SLBRUSER"
|
||||
|
|
Loading…
Reference in New Issue