added small commands, lowercasing env names
All checks were successful
/ Lint Check Shellscripts (push) Successful in 13s
All checks were successful
/ Lint Check Shellscripts (push) Successful in 13s
This commit is contained in:
4
jconf
4
jconf
@@ -47,7 +47,7 @@ fi
|
|||||||
|
|
||||||
cmd=$1
|
cmd=$1
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
adduser)
|
adduser|mku)
|
||||||
USER=$(echo "$2" | tr "[:upper:]" "[:lower:]")
|
USER=$(echo "$2" | tr "[:upper:]" "[:lower:]")
|
||||||
exist=$(awk -F: -v username="$USER" '{if ($1 == username && $3 >= 1000 && $1 != "nobody") {print 1; found=1; exit}} END {if (!found) print 0}' /etc/passwd)
|
exist=$(awk -F: -v username="$USER" '{if ($1 == username && $3 >= 1000 && $1 != "nobody") {print 1; found=1; exit}} END {if (!found) print 0}' /etc/passwd)
|
||||||
if [ "$exist" -eq 1 ]; then
|
if [ "$exist" -eq 1 ]; then
|
||||||
@@ -71,7 +71,7 @@ case "$cmd" in
|
|||||||
fi
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
deluser)
|
deluser|rmu)
|
||||||
USER=$(echo "$2" | tr "[:upper:]" "[:lower:]")
|
USER=$(echo "$2" | tr "[:upper:]" "[:lower:]")
|
||||||
exist=$(awk -F: -v username="$USER" '{if ($1 == username && $3 >= 1000 && $1 != "nobody") {print 1; found=1; exit}} END {if (!found) print 0}' /etc/passwd)
|
exist=$(awk -F: -v username="$USER" '{if ($1 == username && $3 >= 1000 && $1 != "nobody") {print 1; found=1; exit}} END {if (!found) print 0}' /etc/passwd)
|
||||||
if [ "$exist" -eq 0 ]; then
|
if [ "$exist" -eq 0 ]; then
|
||||||
|
|||||||
6
penv
Normal file → Executable file
6
penv
Normal file → Executable file
@@ -186,16 +186,16 @@ cmd=$1
|
|||||||
|
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
new|mk)
|
new|mk)
|
||||||
create "$2" "$3"
|
create "$(echo "$2" | tr "[:upper:]" "[:lower:]")" "$3"
|
||||||
;;
|
;;
|
||||||
del|rm)
|
del|rm)
|
||||||
delete "$2"
|
delete "$(echo "$2" | tr "[:upper:]" "[:lower:]")"
|
||||||
;;
|
;;
|
||||||
# setdef|sd)
|
# setdef|sd)
|
||||||
# setdef $2
|
# setdef $2
|
||||||
# ;;
|
# ;;
|
||||||
act|ac)
|
act|ac)
|
||||||
activate "$2"
|
activate "$(echo "$2" | tr "[:upper:]" "[:lower:]")"
|
||||||
;;
|
;;
|
||||||
list|ls)
|
list|ls)
|
||||||
list
|
list
|
||||||
|
|||||||
Reference in New Issue
Block a user