MCPcopy Create free account
hub / github.com/apache/cloudstack / enable_service

Function enable_service

python/lib/cloud_utils.py:255–263  ·  view source on GitHub ↗
(servicename,forcestart=False)

Source from the content-addressed store, hash-verified

253
254
255def enable_service(servicename,forcestart=False):
256 # Stops AND disables the service
257 if distro is Ubuntu:
258 updatercd("-f",servicename,"remove",stdout=None,stderr=None)
259 updatercd("-f",servicename,"start","2","3","4","5",".",stdout=None,stderr=None)
260 else:
261 chkconfig("--add",servicename,stdout=None,stderr=None)
262 chkconfig("--level","345",servicename,"on",stdout=None,stderr=None)
263 start_service(servicename,force=forcestart)
264
265
266def replace_line(f,startswith,stanza,always_add=False):

Callers

nothing calls this directly

Calls 1

start_serviceFunction · 0.85

Tested by

no test coverage detected