<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Starting SQLGrey automatically</title>
	<atom:link href="http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/feed/" rel="self" type="application/rss+xml" />
	<link>http://diymacserver.com</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 19:40:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bruce</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-6213</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Sat, 02 Jan 2010 18:13:51 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-6213</guid>
		<description>To follow up on my earlier post of 24 Dec 09 wherein I reported a small anomaly regarding sqlgrey behavior when started from launchd...

The sqlgrey author decided that when sqlgrey is NOT started as a daemon it should log to STDOUT as opposed to syslog, the way we Mac users want it. A few small code edits will get sqlgrey back to logging to mail.log and creating its pid file.

Whether you&#039;re using v1.6.8 or v1.7.6, load the sqlgrey executable into your favorite code editor.

1. To get logging back into mail.log, search for
&lt;code&gt;log_file        =&gt; $opt{daemonize} ? &#039;Sys::Syslog&#039; : undef,&lt;/code&gt;
and change it to
&lt;code&gt;log_file        =&gt; &#039;Sys::Syslog&#039;,&lt;/code&gt;
 
2. To get sqlgrey to write it&#039;s pid file, necessary to allow the update_sqlgrey_config script to force re-reading it&#039;s config files, search for
&lt;code&gt;pid_file        =&gt; $opt{daemonize} ? $dflt{pidfile} : undef,&lt;/code&gt;
and change it to
&lt;code&gt;pid_file        =&gt; $dflt{pidfile},&lt;/code&gt;

Another benefit of the above code edits is that sqlgrey-logstats.pl will, once again, find its log entries in mail.log in the format that it is expecting.

Holler if you have any questions.

Happy New Decade to all!

Bruce</description>
		<content:encoded><![CDATA[<p>To follow up on my earlier post of 24 Dec 09 wherein I reported a small anomaly regarding sqlgrey behavior when started from launchd&#8230;</p>
<p>The sqlgrey author decided that when sqlgrey is NOT started as a daemon it should log to STDOUT as opposed to syslog, the way we Mac users want it. A few small code edits will get sqlgrey back to logging to mail.log and creating its pid file.</p>
<p>Whether you&#8217;re using v1.6.8 or v1.7.6, load the sqlgrey executable into your favorite code editor.</p>
<p>1. To get logging back into mail.log, search for<br />
<code>log_file        =&gt; $opt{daemonize} ? 'Sys::Syslog' : undef,</code><br />
and change it to<br />
<code>log_file        =&gt; 'Sys::Syslog',</code></p>
<p>2. To get sqlgrey to write it&#8217;s pid file, necessary to allow the update_sqlgrey_config script to force re-reading it&#8217;s config files, search for<br />
<code>pid_file        =&gt; $opt{daemonize} ? $dflt{pidfile} : undef,</code><br />
and change it to<br />
<code>pid_file        =&gt; $dflt{pidfile},</code></p>
<p>Another benefit of the above code edits is that sqlgrey-logstats.pl will, once again, find its log entries in mail.log in the format that it is expecting.</p>
<p>Holler if you have any questions.</p>
<p>Happy New Decade to all!</p>
<p>Bruce</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-6200</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Wed, 30 Dec 2009 16:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-6200</guid>
		<description>Hi Rich,

Hope you enjoyed a Merry XMas.  Have you had a chance to look into the anomalies that I reported?

Would appreciate it.

Bruce</description>
		<content:encoded><![CDATA[<p>Hi Rich,</p>
<p>Hope you enjoyed a Merry XMas.  Have you had a chance to look into the anomalies that I reported?</p>
<p>Would appreciate it.</p>
<p>Bruce</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-6184</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Sat, 26 Dec 2009 13:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-6184</guid>
		<description>Thank you, Richard.  When you start looking into it you might also notice that sqlgrey-logstats.pl no longer produces output as the log entries written to, in this case, system.log, are in a different format than when sqlgrey writes to mail.log.  Therefore, sqlgrey-logstats.pl no longer recognizes the entries as coming from sqlgrey.

Merry XMAS / Happy New Year,
Bruce</description>
		<content:encoded><![CDATA[<p>Thank you, Richard.  When you start looking into it you might also notice that sqlgrey-logstats.pl no longer produces output as the log entries written to, in this case, system.log, are in a different format than when sqlgrey writes to mail.log.  Therefore, sqlgrey-logstats.pl no longer recognizes the entries as coming from sqlgrey.</p>
<p>Merry XMAS / Happy New Year,<br />
Bruce</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-6180</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Sat, 26 Dec 2009 08:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-6180</guid>
		<description>@Bruce, thanks for mentioning this. I had not noticed this but will have a look at it to see if we can improve here.</description>
		<content:encoded><![CDATA[<p>@Bruce, thanks for mentioning this. I had not noticed this but will have a look at it to see if we can improve here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-6172</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Thu, 24 Dec 2009 19:23:49 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-6172</guid>
		<description>Followed your instructions for installation of sqlgrey and the launchdaemon plist file. Thank you very much.  I have noticed a few anomalies since running from launchd as opposed to running it as its own daemon and wondered if anyone else noticed these, too:

1. The sqlgrey pid file (defaults to (/var/run/sqlgrey.pid) is not created.

2. Logging seems to be written to console.log and system.log as opposed to mail.log.

Neither seems to be destructive (the update_sqlgrey_config script can&#039;t restart sqlgrey since it can&#039;t find it&#039;s pid file) and all seems to be working well.

Has anyone else noticed these things?

Thanks,
Bruce</description>
		<content:encoded><![CDATA[<p>Followed your instructions for installation of sqlgrey and the launchdaemon plist file. Thank you very much.  I have noticed a few anomalies since running from launchd as opposed to running it as its own daemon and wondered if anyone else noticed these, too:</p>
<p>1. The sqlgrey pid file (defaults to (/var/run/sqlgrey.pid) is not created.</p>
<p>2. Logging seems to be written to console.log and system.log as opposed to mail.log.</p>
<p>Neither seems to be destructive (the update_sqlgrey_config script can&#8217;t restart sqlgrey since it can&#8217;t find it&#8217;s pid file) and all seems to be working well.</p>
<p>Has anyone else noticed these things?</p>
<p>Thanks,<br />
Bruce</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-4418</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Sun, 21 Jun 2009 08:08:35 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-4418</guid>
		<description>@Aryan, yes I removed the -d option. Still need to try this on Tiger, read the &lt;a href=&quot;/2009/06/21/finally-solved-sqlgrey-and-keepalive-problem/&quot; rel=&quot;nofollow&quot;&gt;blog&lt;/a&gt; for more info. </description>
		<content:encoded><![CDATA[<p>@Aryan, yes I removed the -d option. Still need to try this on Tiger, read the <a href="/2009/06/21/finally-solved-sqlgrey-and-keepalive-problem/" rel="nofollow">blog</a> for more info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aryan Schmitz</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-4417</link>
		<dc:creator>Aryan Schmitz</dc:creator>
		<pubDate>Sun, 21 Jun 2009 08:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-4417</guid>
		<description>Great, thanks for letting us know!  What exactly did you change? I use Tiger (and have a LaunchDeamon file for SQLgrey in /Library/LaunchDaemonns) and there is no KeepAlive in Tiger but OnDemand -&gt; True should almost have the same effect.
Under the key ProgramArguments
I have an array with 
string -&gt; /usr/sbin/sqlgrey 
string -&gt; -d

Is that the -d opion you removed?

/Aryan</description>
		<content:encoded><![CDATA[<p>Great, thanks for letting us know!  What exactly did you change? I use Tiger (and have a LaunchDeamon file for SQLgrey in /Library/LaunchDaemonns) and there is no KeepAlive in Tiger but OnDemand -&gt; True should almost have the same effect.<br />
Under the key ProgramArguments<br />
I have an array with<br />
string -&gt; /usr/sbin/sqlgrey<br />
string -&gt; -d</p>
<p>Is that the -d opion you removed?</p>
<p>/Aryan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-4415</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Sun, 21 Jun 2009 07:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-4415</guid>
		<description>I&#039;ve got the KeepAlive option working, I just had to remove the -d option from the commandline. Instructions have been updated.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve got the KeepAlive option working, I just had to remove the -d option from the commandline. Instructions have been updated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-4279</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Thu, 11 Jun 2009 07:58:50 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-4279</guid>
		<description>Thanks for the pointer to monit, I will have a look at it. 

There is no reason not to use the launchd on Tiger, at the time I wrote the stuff for Tiger i was not comfortable using launchd but Leopard forced me into it ;-)</description>
		<content:encoded><![CDATA[<p>Thanks for the pointer to monit, I will have a look at it. </p>
<p>There is no reason not to use the launchd on Tiger, at the time I wrote the stuff for Tiger i was not comfortable using launchd but Leopard forced me into it <img src='http://diymacserver.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aryan Schmitz</title>
		<link>http://diymacserver.com/installing-the-mailserver/starting-sqlgrey-automatically/comment-page-1/#comment-4278</link>
		<dc:creator>Aryan Schmitz</dc:creator>
		<pubDate>Thu, 11 Jun 2009 07:16:54 +0000</pubDate>
		<guid isPermaLink="false">http://diymacserver.com/?page_id=244#comment-4278</guid>
		<description>Thank youfor your reply Richard. On http://archives.neohapsis.com/archives/postfix/2007-01/1083.html I see the suggestion to use a monitor utility called monit. It seems to work on Mac OSX as well http://monit.darwinports.com/ could that be a solution?

My other question was if there is any objection to use Launchd on Tiger to start SQLgrey in stead of a StartupItem?</description>
		<content:encoded><![CDATA[<p>Thank youfor your reply Richard. On <a href="http://archives.neohapsis.com/archives/postfix/2007-01/1083.html" rel="nofollow">http://archives.neohapsis.com/archives/postfix/2007-01/1083.html</a> I see the suggestion to use a monitor utility called monit. It seems to work on Mac OSX as well <a href="http://monit.darwinports.com/" rel="nofollow">http://monit.darwinports.com/</a> could that be a solution?</p>
<p>My other question was if there is any objection to use Launchd on Tiger to start SQLgrey in stead of a StartupItem?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
