mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Warn the developer on wrong function usage
This commit is contained in:
parent
96e9812d1c
commit
5d0fdd25c8
1 changed files with 6 additions and 0 deletions
|
@ -1261,6 +1261,12 @@ movefile() {
|
|||
# PARAMETERS: servicename
|
||||
#----------------------------------------------------------------------------------------------------------------------
|
||||
__check_services_systemd() {
|
||||
if [ $# -eq 0 ]; then
|
||||
echoerror "You need to pass a service name to check!"
|
||||
exit 1
|
||||
elif [ $# -ne 0 ]; then
|
||||
echoerror "You need to pass a service name to check as the single argument to the function"
|
||||
fi
|
||||
servicename=$?
|
||||
if [ $(systemctl is-enabled ${servicename}) = "enabled" ]; then
|
||||
return 0
|
||||
|
|
Loading…
Add table
Reference in a new issue