From db79c1552f5507132007cc08da740a660a8a2ea9 Mon Sep 17 00:00:00 2001 From: mollusk Date: Sun, 10 Nov 2019 06:18:50 -0700 Subject: [PATCH] svc.sh: add color tags --- svc.sh | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/svc.sh b/svc.sh index 5503750..51a0002 100755 --- a/svc.sh +++ b/svc.sh @@ -16,6 +16,19 @@ ## WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ############################################################################################## +RED='\033[0;31m' +LRED="\033[1;31m" +BLUE="\033[0;34m" +LBLUE="\033[1;34m" +GREEN="\033[0;32m" +LGREEN="\033[1;32m" +YELLOW="\033[1;33m" +CYAN="\033[0;36m" +LCYAN="\033[1;36m" +PURPLE="\033[0;35m" +LPURPLE="\033[1;35m" +BWHITE="\e[1m" +NC='\033[0m' # No Color case $1 in @@ -34,12 +47,10 @@ case $1 in list | ls | --list ) echo - echo -e "\e[92m Contents of /etc/sv/\e[0m" - #echo "Contents of /etc/sv/" - echo + echo -e "${LGREEN}Contents of /etc/sv/${NC}\n" ls /etc/sv echo - echo -e "\e[96m Contents of /var/service/\e[0m" + echo -e "${LCYAN}Contents of /var/service${NC}\n" echo ls /var/service echo @@ -50,15 +61,15 @@ case $1 in ;; start ) - sv start $2 + sv start "${2}" ;; restart ) - sv restart $2 + sv restart "${2}" ;; stop ) - sv stop $2 + sv stop "${2}" ;; --help | -h | help )