UNVR-NAS/overlay/filesystem/usr/lib/python3/dist-packages/ubnthelpers.py

12 lines
256 B
Python
Raw Normal View History

#!/usr/bin/python3
import os
from functools import lru_cache
"""
A handful of Ubiquiti Unifi device specific functions
"""
@lru_cache(None)
def get_ubnt_shortname() -> str:
return os.popen("ubnteeprom -systeminfo -key shortname").read().rstrip("\n")