mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Fix logic and quoting
This commit is contained in:
parent
40b68e6e07
commit
395c020bcd
1 changed files with 3 additions and 3 deletions
|
@ -1264,11 +1264,11 @@ __check_services_systemd() {
|
|||
if [ $# -eq 0 ]; then
|
||||
echoerror "You need to pass a service name to check!"
|
||||
exit 1
|
||||
elif [ $# -ne 0 ]; then
|
||||
elif [ $# -ne 1 ]; 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
|
||||
servicename=$1
|
||||
if [ "$(systemctl is-enabled ${servicename})" = "enabled" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
|
Loading…
Add table
Reference in a new issue