def start_or_reload_service(has_started=False):
''' Start or reload the application service. '''
with cd(buildman.get_deploy_dir()):
if runner.is_script_defined(constants.SCRIPT_START_OR_RELOAD):
remote_info('Starting/Reloading the service.')
runner.run_script(constants.SCRIPT_START_OR_RELOAD)
elif has_started and runner.is_script_defined(constants.SCRIPT_RELOAD):
remote_info('Reloading the service.')
runner.run_script_safely(constants.SCRIPT_RELOAD)
elif runner.is_script_defined(constants.SCRIPT_START):
remote_info('Starting the service.')
runner.run_script(constants.SCRIPT_START)
评论列表
文章目录