mirror of
https://gitlab.sectorq.eu/jaydee/mqtt_srv.git
synced 2025-12-14 10:34:53 +01:00
build
This commit is contained in:
@@ -692,7 +692,8 @@ def on_message(client, userdata, msg):
|
||||
writeLog("Linux Vol Control")
|
||||
if myObj['target'] == "start":
|
||||
writeLog("Getting sound status")
|
||||
myCmd = "sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer sget Master | awk -F'[][]' '/Left:/ { print $2 }'"
|
||||
#myCmd = "sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer sget Master | awk -F'[][]' '/Left:/ { print $2 }'"
|
||||
myCmd = "sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer sget Master"
|
||||
writeLog(myCmd)
|
||||
output = subprocess.Popen(myCmd, shell=True)
|
||||
|
||||
@@ -1288,8 +1289,8 @@ else:
|
||||
payload[m] = 0
|
||||
client.publish( "home-assistant/" + host + "/hwstats", payload=json.dumps(payload), qos=0, retain=True)
|
||||
|
||||
writeLog(FILE_TIMESTAMP)
|
||||
writeLog(mtime)
|
||||
# writeLog(FILE_TIMESTAMP)
|
||||
# writeLog(mtime)
|
||||
if FILE_TIMESTAMP != mtime:
|
||||
writeLog("Script updated ! restarting...")
|
||||
#os.execv(sys.executable, ['python'] + sys.argv)
|
||||
|
||||
Reference in New Issue
Block a user