check_if_service_exists.sh: some minor changes..
This commit is contained in:
parent
b5a376f7a2
commit
6cdc5a1957
@ -35,8 +35,9 @@ usage() {
|
|||||||
|
|
||||||
[[ -n "$1" ]] && error "$1"
|
[[ -n "$1" ]] && error "$1"
|
||||||
|
|
||||||
|
|
||||||
[[ $terminal ]] && echo -e "
|
[[ $terminal ]] && echo -e "
|
||||||
|
\033[1m--------------------------------------------------\033[m
|
||||||
|
|
||||||
\033[1mUsage:\033[m
|
\033[1mUsage:\033[m
|
||||||
|
|
||||||
$(basename $0) <service-name>
|
$(basename $0) <service-name>
|
||||||
@ -55,10 +56,10 @@ usage() {
|
|||||||
|
|
||||||
\033[1mExample:\033[m
|
\033[1mExample:\033[m
|
||||||
|
|
||||||
Create a saltet SHA512 password hash
|
|
||||||
|
|
||||||
$(basename $0) apache2
|
$(basename $0) apache2
|
||||||
|
|
||||||
|
\033[1m--------------------------------------------------\033[m
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|
||||||
clean_up 1
|
clean_up 1
|
||||||
@ -247,6 +248,12 @@ if $terminal ; then
|
|||||||
echo -e "\033[1m----------\033[m"
|
echo -e "\033[1m----------\033[m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$SERVICE_NAME" ]] ; then
|
||||||
|
error "No servive given on command line.."
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
blank_line
|
blank_line
|
||||||
if service_exists $SERVICE_NAME ; then
|
if service_exists $SERVICE_NAME ; then
|
||||||
echo -e "\t\033[32mService \033[1m$SERVICE_NAME\033[m\033[32m exists\033[m"
|
echo -e "\t\033[32mService \033[1m$SERVICE_NAME\033[m\033[32m exists\033[m"
|
||||||
|
Loading…
Reference in New Issue
Block a user