Skip to content

Commit 7bb3be4

Browse files
committed
Added a python 3 version of the alive script
1 parent 8d4f273 commit 7bb3be4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

alive3.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Watchdog helper script to auto-reboot the system if the agent stops working.
4+
# Add a test-binary entry to /etc/watchdog.conf and start the watchdog service:
5+
# test-binary = /home/ubuntu/wptagent/alive.sh
6+
7+
: ${UBUNTU_VERSION:=`(lsb_release -rs | cut -b 1,2)`}
8+
9+
DIR="$(cd "$(dirname "$0")" && pwd)"
10+
rm /var/log/watchdog/* || true
11+
python3 $DIR/alive.py --file /tmp/wptagent

0 commit comments

Comments
 (0)