svc.sh: add color tags

This commit is contained in:
mollusk 2019-11-10 06:18:50 -07:00
parent b20a391df4
commit db79c1552f

25
svc.sh
View File

@ -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 )