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