Mini Servers: Start Stop design notes: Difference between revisions

m
Reverted edits by Upazixorys (Talk); changed back to last version by Ric
No edit summary
m (Reverted edits by Upazixorys (Talk); changed back to last version by Ric)
 
Line 1: Line 1:
=[http://azysijogen.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
<span id="top"></span>
&lt;span id=&quot;top&quot;&gt;&lt;/span&gt;
<div style="padding:0;margin:0; border-bottom:3px inset #000000">
&lt;div style=&quot;padding:0;margin:0; border-bottom:3px inset #000000&quot;&gt;
{|  
{|  
| [[Image:uc_small_logo.gif | MPG UniCenter]] ||
| [[Image:uc_small_logo.gif | MPG UniCenter]] ||
Mini Servers Start and Stop batch file design notes  
Mini Servers Start and Stop batch file design notes  
|}
|}
&lt;/div&gt;
</div>
{| cellpadding=&quot;2&quot;
{| cellpadding="2"
|
|
__TOC__
__TOC__
Line 46: Line 45:


Required information port and PID are easily accessible. It is possible to use batch file  “tokens” this really is overkill hence use a pipe with find, makes the code a little easier to read for example:
Required information port and PID are easily accessible. It is possible to use batch file  “tokens” this really is overkill hence use a pipe with find, makes the code a little easier to read for example:
&lt;pre&gt;
<pre>
rem ## It exists is it running
rem ## It exists is it running
SET /P pid=&lt;udrive\usr\local\apache2\logs\httpd.pid
SET /P pid=<udrive\usr\local\apache2\logs\httpd.pid
netstat -anop tcp | FIND /I &quot; %pid%&quot; &gt;NUL
netstat -anop tcp | FIND /I " %pid%" >NUL
IF ERRORLEVEL 1 goto :NOTRUNNING
IF ERRORLEVEL 1 goto :NOTRUNNING
IF ERRORLEVEL 0 goto :RUNNING
IF ERRORLEVEL 0 goto :RUNNING
&lt;/pre&gt;
</pre>
'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
=== Kill process ===
=== Kill process ===