whoami7 - Manager
:
/
usr
/
local
/
nagios
/
plugins
/
Upload File:
files >> //usr/local/nagios/plugins/check_cl_license
#!/usr/bin/env python ##################################### # this file is under Puppet control # # the last change: # # 2013/11/15, Eduard N. # ##################################### # version 0.1, 2013/10/16 # writen by Eduard N. import sys, re from subprocess import Popen, PIPE cldetect = '/usr/bin/cldetect' result, err = Popen([cldetect, '--check-license'], stdout=PIPE).communicate() print (result) if result == 'OK\n': sys.exit(0) elif re.match('^No valid license found', result): sys.exit(2) else: sys.exit(1)
Copyright ©2021 || Defacer Indonesia