17 lines
267 B
Bash
Executable File
17 lines
267 B
Bash
Executable File
#!/bin/bash
|
|
|
|
function checkServices {
|
|
IFS=',' read -r -a array <<< "$1"
|
|
result=""
|
|
for service in "${array[@]}"
|
|
do
|
|
res=$(systemctl is-active "$service")
|
|
|
|
if [ "$res" != "active" ]; then
|
|
result="$result $service"
|
|
fi
|
|
done
|
|
echo $result
|
|
}
|
|
|