We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8023484 commit 4da2b93Copy full SHA for 4da2b93
check_bind_gw.py
@@ -0,0 +1,28 @@
1
+#!/usr/bin/env python3
2
+
3
+def check_bind9():
4
+ from common import pinit
5
6
+ photon, settings = pinit('check_bind9', verbose=True)
7
8
+ status = photon.m(
9
+ 'testing for bind9',
10
+ cmdd=dict(
11
+ cmd='sudo rndc status',
12
+ ),
13
+ critical=False
14
+ )
15
16
+ if status.get('returncode') != 0:
17
+ photon.m(
18
+ '(re) starting bind9',
19
20
+ cmd='sudo service bind9 start'
21
22
23
24
+ else:
25
+ photon.m('bind9 is running')
26
27
+if __name__ == '__main__':
28
+ check_bind9()
0 commit comments