Configure Systemd Watchdog
that monitors the reachability of Poseidon and automatically restarts Poseidon if required.
This commit is contained in:

committed by
Sebastian Serth

parent
2d34854450
commit
b48c7fe8b6
@@ -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++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user