Ejemplo n.º 1
0
 def export_stopComponent( self, system, component ):
   """ Stop the specified component, running with the runsv daemon
   """
   return InstallTools.runsvctrlComponent( system, component, 'd' )
Ejemplo n.º 2
0
 def export_restartComponent( self, system, component ):
   """ Restart the specified component, running with the runsv daemon
   """
   return InstallTools.runsvctrlComponent( system, component, 't' )
 def export_stopComponent(self, system, component):
     """ Stop the specified component, running with the runsv daemon
 """
     return InstallTools.runsvctrlComponent(system, component, 'd')
 def export_restartComponent(self, system, component):
     """ Restart the specified component, running with the runsv daemon
 """
     return InstallTools.runsvctrlComponent(system, component, 't')
Ejemplo n.º 5
0
Script.setUsageMessage( '\n'.join( [ __doc__.split( '\n' )[1],
                                     'Usage:',
                                     '  %s [option|cfgfile] ... [system [service|agent]]' % Script.scriptName,
                                     'Arguments:',
                                     '  system:        Name of the system for the component (default *: all)',
                                     '  service|agent: Name of the particular component (default *: all)' ] ) )
Script.parseCommandLine()
args = Script.getPositionalArgs()
if len( args ) > 2:
  Script.showHelp()
  exit( -1 )

system = '*'
component = '*'
if len( args ) > 0:
  system = args[0]
if system != '*':
  if len( args ) > 1:
    component = args[1]
#
from DIRAC.Core.Utilities import InstallTools
#
InstallTools.exitOnError = True
#
result = InstallTools.runsvctrlComponent( system, component, 'u' )
if not result['OK']:
  print 'ERROR:', result['Message']
  exit( -1 )

InstallTools.printStartupStatus( result['Value'] )
Ejemplo n.º 6
0
    'Stop DIRAC component using runsvctrl utility', 'Usage:',
    '  %s [option|cfgfile] ... [system [service|agent]]' % Script.scriptName,
    'Arguments:',
    '  system:        Name of the system for the component (default *: all)',
    '  service|agent: Name of the particular component (default *: all)'
]))
Script.parseCommandLine()
args = Script.getPositionalArgs()
if len(args) > 2:
    Script.showHelp()
    exit(-1)

system = '*'
component = '*'
if len(args) > 0:
    system = args[0]
if system != '*':
    if len(args) > 1:
        component = args[1]
#
from DIRAC.Core.Utilities import InstallTools
#
InstallTools.exitOnError = True
#
result = InstallTools.runsvctrlComponent(system, component, 'd')
if not result['OK']:
    print 'ERROR:', result['Message']
    exit(-1)

InstallTools.printStartupStatus(result['Value'])