git.99rst.org
/
stevenblack-hosts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
c2ebad9
)
Check if a service is running (Fixed #1337)
author
Max G
<redacted>
Fri, 10 Jul 2020 19:47:47 +0000
(22:47 +0300)
committer
Max G
<redacted>
Fri, 10 Jul 2020 19:47:47 +0000
(22:47 +0300)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index 8eaff17177ca46059c0e066e5a82b8ac9c640124..a2f09ebd90ac79705977bb132e3dd1b3d5743f06 100644
(file)
--- a/
updateHostsFile.py
+++ b/
updateHostsFile.py
@@
-1306,6
+1306,9
@@
def flush_dns_cache():
)
if os.path.isfile(service_file):
+ if 0 != subprocess.call([systemctl, "status", service],
+ stdout=subprocess.DEVNULL):
+ continue
dns_cache_found = True
if subprocess.call(SUDO + [systemctl, "restart", service]):
git clone https://git.99rst.org/PROJECT