예제 #1
0
def main():
    Script.disableCS()
    # Registering arguments will automatically add their description to the help menu
    Script.registerArgument(
        " System:  Name of the system for the component (default *: all)",
        mandatory=False,
        default="*")
    Script.registerArgument(
        (
            "Service: Name of the particular component (default *: all)",
            "Agent:   Name of the particular component (default *: all)",
        ),
        mandatory=False,
        default="*",
    )
    _, args = Script.parseCommandLine()
    system, component = Script.getPositionalArgs(group=True)

    from DIRAC.FrameworkSystem.Client.ComponentInstaller import gComponentInstaller

    if len(args) > 2:
        Script.showHelp(exitCode=1)

    if system != "*":
        if len(args) > 1:
            component = args[1]

    gComponentInstaller.exitOnError = True

    result = gComponentInstaller.runsvctrlComponent(system, component, "d")
    if not result["OK"]:
        print("ERROR:", result["Message"])
        exit(-1)

    gComponentInstaller.printStartupStatus(result["Value"])
                                     '  system:        Name of the system for the component (default *: all)',
                                     '  service|agent: Name of the particular component (default *: all)' ] ) )
Script.parseCommandLine()
args = Script.getPositionalArgs()

from DIRAC.FrameworkSystem.Client.ComponentInstaller import gComponentInstaller


__RCSID__ = "$Id$"

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]
#
gComponentInstaller.exitOnError = True
#
result = gComponentInstaller.getStartupComponentStatus( [system, component] )
if not result['OK']:
  print 'ERROR:', result['Message']
  exit( -1 )

gComponentInstaller.printStartupStatus( result['Value'] )
예제 #3
0
    '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()

from DIRAC.FrameworkSystem.Client.ComponentInstaller import gComponentInstaller

__RCSID__ = "$Id$"

if len(args) > 2:
    Script.showHelp(exitCode=1)

system = '*'
component = '*'
if len(args) > 0:
    system = args[0]
if system != '*':
    if len(args) > 1:
        component = args[1]
#
gComponentInstaller.exitOnError = True
#
result = gComponentInstaller.getStartupComponentStatus([system, component])
if not result['OK']:
    print('ERROR:', result['Message'])
    exit(-1)

gComponentInstaller.printStartupStatus(result['Value'])