s6

Mirror/fork of https://skarnet.org/software/s6/
git clone https://ccx.te2000.cz/git/s6
Log | Files | Refs | README | LICENSE

s6-instance-delete.html (3094B)


      1 <html>
      2   <head>
      3     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      4     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      5     <meta http-equiv="Content-Language" content="en" />
      6     <title>s6: the s6-instance-delete program</title>
      7     <meta name="Description" content="s6: the s6-instance-delete program" />
      8     <meta name="Keywords" content="s6 command s6-instance-delete instance dynamic instantiation instanced services deletion s6-svunlink" />
      9     <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
     10   </head>
     11 <body>
     12 
     13 <p>
     14 <a href="index.html">s6</a><br />
     15 <a href="//skarnet.org/software/">Software</a><br />
     16 <a href="//skarnet.org/">skarnet.org</a>
     17 </p>
     18 
     19 <h1> The s6-instance-delete program </h1>
     20 
     21 <p>
     22 s6-instance-delete deletes an existing instance of a currently supervised
     23 <a href="instances.html">instanced service</a>.
     24 </p>
     25 
     26 <h2> Interface </h2>
     27 
     28 <pre>
     29      s6-instance-delete [ -X ] [ -t <em>timeout</em> ] <em>servicedir</em> <em>name</em>
     30 </pre>
     31 
     32 <ul>
     33  <li> s6-instance-delete expects a running, supervised
     34 <a href="instances.html">instanced service</a> in <em>servicedir</em>,
     35 as well as an existing instance of this service named <em>name</em>
     36 (it doesn't matter if the instance is up or down). </li>
     37  <li> It deletes the <em>name</em> instance. </li>
     38  <li> It exits 0. </li>
     39 </ul>
     40 
     41 <h2> Exit codes </h2>
     42 
     43 <ul>
     44  <li> 0: success </li>
     45  <li> 100: wrong usage </li>
     46  <li> 111: system call failed </li>
     47 </ul>
     48 
     49 <h2> Options </h2>
     50 
     51 <ul>
     52  <li> <tt>-X</tt>&nbsp;: don't wait. s6-instance-delete will exit right away,
     53 without waiting for the instance (and its supervisor) to properly disappear. </li>
     54  <li> <tt>-t&nbsp;<em>timeout</em></tt>&nbsp;: if the instance supervisor has not exited
     55 after <em>timeout</em> milliseconds, s6-instance-delete will still exit.
     56 By default, <em>timeout</em> is 0, which means no time limit. </li>
     57 </ul>
     58 
     59 <h2> Notes </h2>
     60 
     61 <ul>
     62  <li> s6-instance-delete is similar to
     63 <a href="s6-svunlink.html">s6-svunlink</a>, because it uses the same underlying
     64 library functions. Under the hood, an instance is a regular service running
     65 on a supervision tree that is specific to the instanced service, and
     66 s6-instance-delete removes a service directory from that tree. </li>
     67  <li> If the template for the service is logged, then s6-instance-delete will
     68 delete both the instance and its logger. </li>
     69  <li> s6-instance-delete and <a href="s6-instance-create.html">s6-instance-create</a>
     70 are relatively expensive operations, because they have to recursively copy or
     71 delete directories and use the <a href="libs6/ftrigr.html">synchronization mechanism</a>
     72 with the instance supervisor, compared to
     73 <a href="s6-instance-control.html">s6-instance-control</a> which only has to send
     74 commands to already existing supervisors. If you are going to turn instances on and
     75 off on a regular basis, it is more efficient to keep the instance existing and control
     76 it with <a href="s6-instance-control.html">s6-instance-control</a> than it is to
     77 repeatedly create and delete it. </li>
     78 </ul>
     79 
     80 </body>
     81 </html>