network/roles/exit/files/keepalive-service

19 lines
260 B
Plaintext
Raw Normal View History

2023-12-18 10:22:14 +00:00
#!/bin/sh
class="${1}"
name="${2}"
state="${3}"
case "${state}" in
"MASTER" | "FAULT")
systemctl start "${name}"
;;
"BACKUP" | "STOP")
systemctl stop "${name}"
;;
*)
logger "keepalived unknown state for ${name}: ${state}"
exit 1
;;
esac