<?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; script</title>
	<atom:link href="http://www.x83.net/tag/script/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 generate /etc/network/interfaces file on Ubuntu/Debian</title>
		<link>http://www.x83.net/script-to-generate-etcnetworkinterfaces-file-on-ubuntudebian/</link>
		<comments>http://www.x83.net/script-to-generate-etcnetworkinterfaces-file-on-ubuntudebian/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 18:37:04 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[/etc/network/interfaces/debian]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=386</guid>
		<description><![CDATA[#!/bin/bash ifile=/etc/network/interfaces echo -n &#8220;Insert IPstart:&#8221; read ipstart echo -n &#8220;Insert IPend:&#8221; read ipend echo -n &#8220;Insert Gateway:&#8221; read gw #echo -n &#8220;Insert Subnet: &#8221; #read subnet echo -n &#8220;Insert Netmask: &#8221; read net echo -n &#8220;Insert aliast to start: &#8221; read ali firstIp=`echo &#8220;${ipstart%.*}&#8221;` lastIpStart=`echo &#8220;${ipstart##*.}&#8221;` lastIpEnd=`echo &#8220;${ipend##*.}&#8221;` dif=`echo $(($lastIpEnd-$lastIpStart))` ip=$lastIpStart for ((i=$ali;i>$ifile echo [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>#!/bin/bash<br />
ifile=/etc/network/interfaces<br />
echo -n &#8220;Insert IPstart:&#8221;<br />
read ipstart<br />
echo -n &#8220;Insert IPend:&#8221;<br />
read ipend<br />
echo -n &#8220;Insert Gateway:&#8221;<br />
read gw<br />
#echo -n &#8220;Insert Subnet: &#8221;<br />
#read subnet<br />
echo -n &#8220;Insert Netmask: &#8221;<br />
read net<br />
echo -n &#8220;Insert aliast to start: &#8221;<br />
read ali</p>
<p>firstIp=`echo &#8220;${ipstart%.*}&#8221;`<br />
lastIpStart=`echo &#8220;${ipstart##*.}&#8221;`<br />
lastIpEnd=`echo &#8220;${ipend##*.}&#8221;`<br />
dif=`echo $(($lastIpEnd-$lastIpStart))`</p>
<p>ip=$lastIpStart<br />
for ((i=$ali;i<=$ali+$dif;i++)){<br />
echo "auto eth0:$i" >>$ifile<br />
echo &#8220;iface eth0:$i inet static&#8221; >>$ifile<br />
echo &#8220;address $firstIp.$ip&#8221; >>$ifile<br />
echo &#8220;network $subnet&#8221; >>$ifile<br />
echo &#8220;netmask $net&#8221; >>$ifile<br />
echo &#8220;gateway $gw&#8221; >> $ifile<br />
echo &#8221; &#8221; >> $ifile<br />
let ip++<br />
}
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/script-to-generate-etcnetworkinterfaces-file-on-ubuntudebian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla with suPHP: Premature end of script headers: index.php</title>
		<link>http://www.x83.net/joomla-with-suphp-premature-end-of-script-headers-index-php/</link>
		<comments>http://www.x83.net/joomla-with-suphp-premature-end-of-script-headers-index-php/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 04:55:58 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[premature]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[script headers]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=355</guid>
		<description><![CDATA[Got this error while I was trying to configure Joomla to work with suPHP. This is the config I`m using to make it work: ServerAdmin aa@aa.com ServerName www.site.org ServerAlias site.org DocumentRoot /home/virtuals/www.site.org/public_html/ ErrorLog /home/virtuals/www.site.org/logs/error.log CustomLog /home/virtuals/www.site.org/logs/access.log combined ServerSignature On php_admin_flag safe_mode Off php_admin_flag register_globals On php_admin_value open_basedir /home/virtuals/www.site.org/public_html:/tmp AllowOverride All Allow from All Options Indexes [...]]]></description>
			<content:encoded><![CDATA[<p>Got this error while I was trying to configure Joomla to work with suPHP. This is the config I`m using to make it work:</p>
<p><VirtualHost *:80><br />
        ServerAdmin aa@aa.com<br />
        ServerName www.site.org<br />
        ServerAlias site.org<br />
        DocumentRoot /home/virtuals/www.site.org/public_html/<br />
        ErrorLog /home/virtuals/www.site.org/logs/error.log<br />
        CustomLog /home/virtuals/www.site.org/logs/access.log combined<br />
        ServerSignature On<br />
        php_admin_flag safe_mode Off<br />
        php_admin_flag register_globals On<br />
        php_admin_value open_basedir /home/virtuals/www.site.org/public_html:/tmp</p>
<p></VirtualHost><br />
<Directory /home/virtuals/www.site.org/public_html ><br />
    AllowOverride All<br />
    Allow from  All<br />
    Options Indexes FollowSymLinks<br />
</Directory><br />
<Directory "/home/virtuals/www.site.org/public_html"><br />
        <IfModule mod_suphp.c><br />
               php_admin_flag engine on<br />
               suPHP_Engine on<br />
               AddHandler php5-script .php<br />
               php_admin_flag engine on<br />
        </IfModule><br />
</Directory></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/joomla-with-suphp-premature-end-of-script-headers-index-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>

