fix restart
This commit is contained in:
parent
b8d39e41a3
commit
284b8e5d3b
@ -130,6 +130,7 @@ class Luniebox(object):
|
||||
|
||||
if restart:
|
||||
subprocess.run(["sudo", "systemctl", "restart", "spotifyd"])
|
||||
time.sleep(20)
|
||||
|
||||
tries = 0
|
||||
spotifyd_status = subprocess.call(
|
||||
@ -137,7 +138,7 @@ class Luniebox(object):
|
||||
|
||||
while spotifyd_status != 0 and tries < max_tries:
|
||||
subprocess.call(["systemctl", "restart", "spotifyd"])
|
||||
tries += 1
|
||||
tries = tries + 1
|
||||
time.sleep(10 * tries)
|
||||
spotifyd_status = subprocess.call(
|
||||
["systemctl", "is-active", "--quiet", "spotifyd"])
|
||||
|
Loading…
Reference in New Issue
Block a user