def signal(signal=None):
 no_extra_args = ('configtest', 'status', 'fullstatus')
 valid_signals = ('start', 'stop', 'restart', 'graceful', 'graceful-stop')
 if ((signal not in valid_signals) and (signal not in no_extra_args)):
  return
 if (signal in valid_signals):
  arguments = ' -k {0}'.format(signal)
 else:
  arguments = ' {0}'.format(signal)
 cmd = (_detect_os() + arguments)
 out = __salt__['cmd.run_all'](cmd)
 if (out['retcode'] and out['stderr']):
  ret = out['stderr'].strip()
 elif out['stderr']:
  ret = out['stderr'].strip()
 elif out['stdout']:
  ret = out['stdout'].strip()
 else:
  ret = 'Command: "{0}" completed successfully!'.format(cmd)
 return ret

def signal ( signal = None ) : no_extra_args = ( 'configtest' , 'status' , 'fullstatus' ) valid_signals = ( 'start' , 'stop' , 'restart' , 'graceful' , 'graceful-stop' ) if ( ( signal not in valid_signals ) and ( signal not in no_extra_args ) ) : return if ( signal in valid_signals ) : arguments = ' -k {0}' . format ( signal ) else : arguments = ' {0}' . format ( signal ) cmd = ( _detect_os ( ) + arguments ) out = __salt__ [ 'cmd.run_all' ] ( cmd ) if ( out [ 'retcode' ] and out [ 'stderr' ] ) : ret = out [ 'stderr' ] . strip ( ) elif out [ 'stderr' ] : ret = out [ 'stderr' ] . strip ( ) elif out [ 'stdout' ] : ret = out [ 'stdout' ] . strip ( ) else : ret = 'Command: "{0}" completed successfully!' . format ( cmd ) return ret
exactly the same as :func:signal .