def _systemctl_cmd(action, name=None, systemd_scope=False):
 ret = []
 if (systemd_scope and salt.utils.systemd.has_scope(__context__) and __salt__['config.get']('systemd.scope', True)):
  ret.extend(['systemd-run', '--scope'])
 ret.append('systemctl')
 if isinstance(action, six.string_types):
  action = shlex.split(action)
 ret.extend(action)
 if (name is not None):
  ret.append(_canonical_unit_name(name))
 if ('status' in ret):
  ret.extend(['-n', '0'])
 return ret

def _systemctl_cmd ( action , name = None , systemd_scope = False ) : ret = [ ] if ( systemd_scope and salt . utils . systemd . has_scope ( __context__ ) and __salt__ [ 'config.get' ] ( 'systemd.scope' , True ) ) : ret . extend ( [ 'systemd-run' , '--scope' ] ) ret . append ( 'systemctl' ) if isinstance ( action , six . string_types ) : action = shlex . split ( action ) ret . extend ( action ) if ( name is not None ) : ret . append ( _canonical_unit_name ( name ) ) if ( 'status' in ret ) : ret . extend ( [ '-n' , '0' ] ) return ret
build a systemctl command line .