Mini Servers: Start Stop design notes: Difference between revisions
Mini Servers: Start Stop design notes (view source)
Revision as of 08:22, 24 November 2010
, 24 November 2010Reverted edits by Upazixorys (Talk); changed back to last version by Ric
Upazixorys (talk | contribs) No edit summary |
m (Reverted edits by Upazixorys (Talk); changed back to last version by Ric) |
||
Line 1: | Line 1: | ||
<span id="top"></span> | |||
<div style="padding:0;margin:0; border-bottom:3px inset #000000"> | |||
{| | {| | ||
| [[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 | ||
|} | |} | ||
</div> | |||
{| cellpadding= | {| 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: | ||
<pre> | |||
rem ## It exists is it running | rem ## It exists is it running | ||
SET /P pid= | SET /P pid=<udrive\usr\local\apache2\logs\httpd.pid | ||
netstat -anop tcp | FIND /I | 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 | ||
</pre> | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
=== Kill process === | === Kill process === |