<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>x83.net &#187; nobody</title>
	<atom:link href="http://www.x83.net/tag/nobody/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 13:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Script to autorestart httpd server if it fails</title>
		<link>http://www.x83.net/script-to-autorestart-httpd-server-if-it-fails/</link>
		<comments>http://www.x83.net/script-to-autorestart-httpd-server-if-it-fails/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 06:24:38 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[checkhttp.sh]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[ipcrm]]></category>
		<category><![CDATA[ipcs]]></category>
		<category><![CDATA[nobody]]></category>
		<category><![CDATA[restart]]></category>
		<category><![CDATA[restartsrv_httpd]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=261</guid>
		<description><![CDATA[I use this script on a cpanel server..if output of pgrep command is 0 then the $restart command is issued #!/bin/bash restart=&#8221;/scripts/restartsrv_httpd&#8221; pgrep httpd &#124;&#124; $restart exit 0 If its a VPS then I might add to clear the Semaphore Arrays. for i in `ipcs -s &#124; grep nobody &#124; awk &#8216;{print $2}&#8217;`; do ipcrm [...]]]></description>
			<content:encoded><![CDATA[<p>I use this script on a cpanel server..if output of pgrep command is 0 then the $restart command is issued</p>
<blockquote><p>#!/bin/bash<br />
restart=&#8221;/scripts/restartsrv_httpd&#8221;<br />
pgrep httpd || $restart<br />
exit 0</p></blockquote>
<p>If its a VPS then I might add to clear the Semaphore Arrays.</p>
<blockquote><p>for i in `ipcs -s | grep nobody | awk &#8216;{print $2}&#8217;`; do ipcrm -s $i; done</p></blockquote>
<p>Then I put this script into Cron to run every 5 minutes.</p>
<blockquote><p># MIN HOUR DAYOFMONTH MONTH DAYOFWEEK COMMAND<br />
*/5 * * * * /root/checkhttp.sh
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/script-to-autorestart-httpd-server-if-it-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

