check_if_service_exists.sh: some minor changes..

This commit is contained in:
Christoph 2020-09-26 12:34:09 +02:00
parent b5a376f7a2
commit 6cdc5a1957

View File

@ -35,8 +35,9 @@ usage() {
[[ -n "$1" ]] && error "$1"
[[ $terminal ]] && echo -e "
\033[1m--------------------------------------------------\033[m
\033[1mUsage:\033[m
$(basename $0) <service-name>
@ -55,9 +56,9 @@ usage() {
\033[1mExample:\033[m
Create a saltet SHA512 password hash
$(basename $0) apache2
$(basename $0) apache2
\033[1m--------------------------------------------------\033[m
"
@ -247,6 +248,12 @@ if $terminal ; then
echo -e "\033[1m----------\033[m"
fi
if [[ -z "$SERVICE_NAME" ]] ; then
error "No servive given on command line.."
usage
fi
blank_line
if service_exists $SERVICE_NAME ; then
echo -e "\t\033[32mService \033[1m$SERVICE_NAME\033[m\033[32m exists\033[m"