title: How to take Jenkins master node offline using CLI?
body: <p>I have been manually taking the master (and only) node offline whenever I sync our development database to avoid a bunch of false test failures. I have a script that does the full DB import and would like to automate the node maintenance as well.</p>
  
  <p>How can I mark the master node temporarily offline using the command-line interface JAR?</p>
  
  <ul>
  <li>I wrote a simple Bash script to execute Jenkins tasks.</li>
  <li><p>I can authenticate using that script.</p>
  
  <pre><code>$ jenkins who-am-i
  Authenticated as: david
  Authorities:
    david
    authenticated
  </code></pre></li>
  <li><p>However, I cannot get <code>offline-node</code> or <code>online-node</code> to recognize the master node. The help states that I can omit the node name for "master", but that doesn't work.</p>
  
  <pre><code>$ jenkins offline-node
  Argument "NAME" is required
  java -jar jenkins-cli.jar online-node NAME
  Stop using a node for performing builds temporarily, until the next "online-node" command.
   NAME                : Slave name, or empty string for master
  </code></pre>
  
  <p>It seems to be looking specifically for a slave, but I need to take the master's executor offline.</p>
  
  <pre><code>$ jenkins offline-node master
  No such slave "master" exists. Did you mean "null"?
  </code></pre></li>
  </ul>