blob: ce7354da6d370a7e44b70d5a34e65040bd00922d [file] [log] [blame]
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# NB: this code is downloaded for use by;
# beware of adding dependencies on client libraries such as utils
"""Provides utility methods for interacting with upstart"""
import os
def ensure_running(service_name):
cmd = 'initctl status %s | grep start/running' % service_name