We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fd2897 commit ec221f4Copy full SHA for ec221f4
playbooks/roles/healthchecks/files/xid_checker.py
@@ -5,9 +5,14 @@
5
import subprocess
6
import sys
7
import re
8
+import os
9
10
class XidChecker:
11
def __init__(self, dmesg_cmd="dmesg", time_interval=60):
12
+ # if user is root
13
+ if not os.geteuid() == 0:
14
+ logger.info("The XidChecker script did not run since it must be run as root")
15
+ sys.exit(1)
16
self.dmesg_cmd = dmesg_cmd
17
self.results = {}
18
0 commit comments