Configure Systemd Watchdog

that monitors the reachability of Poseidon and automatically restarts Poseidon if required.
This commit is contained in:
Maximilian Paß
2023-12-05 20:28:25 +01:00
committed by Sebastian Serth
parent 2d34854450
commit b48c7fe8b6
6 changed files with 122 additions and 12 deletions

View File

@@ -46,6 +46,8 @@ func waitForPoseidon() {
}
}
var PoseidonRestartCount = 0
func killPoseidon() {
processes, err := process.Processes()
if err != nil {
@@ -62,6 +64,7 @@ func killPoseidon() {
log.WithError(err).Error("Error killing Poseidon")
} else {
log.Info("Killed Poseidon")
PoseidonRestartCount++
}
}
}