discord.sh now displays to console as well by default, and a lot of cleanup
This commit is contained in:
+5
-5
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# determine if show all or not, default to not
|
||||
all=""
|
||||
if [[ "$1" == "-a" ]] || [[ "$1" == "--all" ]]; then
|
||||
all="--all"
|
||||
all=''
|
||||
if [[ "$1" == '-a' ]] || [[ "$1" == '--all' ]]; then
|
||||
all='--all'
|
||||
fi
|
||||
|
||||
if [[ -n `groups | grep 'docker'` ]]; then
|
||||
if [[ -n $(groups | grep 'docker') ]]; then
|
||||
docker ps $all --format='table {{.Names}}\t{{.Status}}' | grep -v 'NAMES' | sort
|
||||
elif [[ -n `groups | grep 'sudo'` ]]; then
|
||||
elif [[ -n $(groups | grep 'sudo') ]]; then
|
||||
sudo docker ps $all --format='table {{.Names}}\t{{.Status}}' | grep -v 'NAMES' | sort
|
||||
else
|
||||
echo 'User lacks docker permission'
|
||||
|
||||
Reference in New Issue
Block a user