Added hubic status script
This commit is contained in:
parent
f912d3d912
commit
6cd4bc8ea2
16
hubic.py
Executable file
16
hubic.py
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
import re
|
||||
import lib.helpers as helpers
|
||||
from subprocess import check_output
|
||||
|
||||
hubic_available = helpers.is_exe('/usr/bin/hubic')
|
||||
|
||||
if not hubic_available:
|
||||
print('Not running')
|
||||
os.exit(1)
|
||||
|
||||
return_value = check_output(['hubic', 'status'])
|
||||
m = re.search(r'State: (.*)', return_value.decode("utf-8"))
|
||||
print(m.group(1))
|
||||
|
Loading…
Reference in New Issue
Block a user