summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Client/Debian.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py
index ebc22adea..f045a07ad 100644
--- a/src/lib/Client/Debian.py
+++ b/src/lib/Client/Debian.py
@@ -218,10 +218,14 @@ class Debian(Toolset):
else:
self.VerifyEntry(child)
self.CondPrint('debug', "Re-checking entry %s %s: %s" % (child.tag, child.get('name'), self.states[child]))
- if not self.setup['build']:
- for svc in [x.get('name') for x in entry.getchildren() if x.tag == 'Service']:
+
+
+ for svc in [x.get('name') for x in entry.getchildren() if x.tag == 'Service']:
+ if not self.setup['build']:
self.CondPrint('debug', "Restarting service %s" % (svc))
system('/etc/init.d/%s restart > /dev/null' % (svc))
+ else:
+ system("/etc/init.d/%s stop" % (svc))
if [x for x in entry.getchildren() if not self.states[x]]:
if entry.tag == 'Bundle':