mirror of
https://gitlab.sectorq.eu/jaydee/mqtt_srv.git
synced 2025-12-14 02:34:52 +01:00
build
This commit is contained in:
10
mqtt_srv.py
10
mqtt_srv.py
@@ -696,8 +696,16 @@ def on_message(client, userdata, msg):
|
|||||||
myCmd = "sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer sget Master"
|
myCmd = "sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer sget Master"
|
||||||
writeLog(myCmd)
|
writeLog(myCmd)
|
||||||
output = subprocess.Popen(myCmd, shell=True)
|
output = subprocess.Popen(myCmd, shell=True)
|
||||||
|
cmd = ["sudo", "XDG_RUNTIME_DIR=/run/user/1000", "-u", "jd", "amixer", "sget", "Master"]
|
||||||
|
|
||||||
|
result = subprocess.run(
|
||||||
|
" ".join(cmd),
|
||||||
|
shell=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True
|
||||||
|
)
|
||||||
|
|
||||||
|
writeLog(result.stdout.strip())
|
||||||
writeLog(f"Status of volume {output}")
|
writeLog(f"Status of volume {output}")
|
||||||
writeLog("HAHAHAAA")
|
writeLog("HAHAHAAA")
|
||||||
myCmd = f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 20%'
|
myCmd = f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 20%'
|
||||||
|
|||||||
Reference in New Issue
Block a user