17 lines
348 B
Plaintext
17 lines
348 B
Plaintext
|
#!/bin/bash -eu
|
||
|
|
||
|
ALL_PCP_SERVICES='pmcd,pmie,pmlogger,pmproxy'
|
||
|
PCP_SERVICES=${PCP_SERVICES:-${ALL_PCP_SERVICES}}
|
||
|
|
||
|
failed=""
|
||
|
for service in ${PCP_SERVICES//,/ }; do
|
||
|
if ! systemctl is-active $service --quiet; then
|
||
|
failed="$failed $service"
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
if [ ! -z "$failed" ]; then
|
||
|
echo "$0: services not active:$failed"
|
||
|
exit 1
|
||
|
fi
|