<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tyk.wiki/index.php?action=history&amp;feed=atom&amp;title=PostgreSQL_rc.d_script_outputting_fortunes</id>
	<title>PostgreSQL rc.d script outputting fortunes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tyk.wiki/index.php?action=history&amp;feed=atom&amp;title=PostgreSQL_rc.d_script_outputting_fortunes"/>
	<link rel="alternate" type="text/html" href="https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;action=history"/>
	<updated>2026-05-10T14:18:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=142&amp;oldid=prev</id>
		<title>Tykling at 11:45, 3 January 2010</title>
		<link rel="alternate" type="text/html" href="https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=142&amp;oldid=prev"/>
		<updated>2010-01-03T11:45:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:45, 3 January 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot;&gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Explanation ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Explanation ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This happens because the postgresql rc.d script switches user to the postgresql &#039;&#039;pgsql&#039;&#039; user before executing the actual start/stop commands. For some reason, and only on this specific machine, the user switch with su called &#039;&#039;.profile&#039;&#039; which in turn ran the fortune system.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This happens because the postgresql rc.d script switches user to the postgresql &#039;&#039;pgsql&#039;&#039; user before executing the actual start/stop commands. For some reason, and only on this specific machine, the user switch with su called &#039;&#039;.profile&#039;&#039; which in turn ran the fortune system&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. The reason is probably that I always install &quot;minimal&quot; (in sysinstall) FreeBSD machines these days. The machine that had this problem is older and was installed as &quot;standard&quot; (in sysinstall). This means that /usr/games/fortune/ exists on this machine and not on a lot of my newer machines. The fortune line from .profile will only run if the fortunes are installed, of course&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tykling</name></author>
	</entry>
	<entry>
		<id>https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=139&amp;oldid=prev</id>
		<title>Tykling: moved Postgres fortunes to PostgreSQL rc.d script outputting fortunes</title>
		<link rel="alternate" type="text/html" href="https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=139&amp;oldid=prev"/>
		<updated>2009-12-20T09:47:03Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/Postgres_fortunes&quot; class=&quot;mw-redirect&quot; title=&quot;Postgres fortunes&quot;&gt;Postgres fortunes&lt;/a&gt; to &lt;a href=&quot;/PostgreSQL_rc.d_script_outputting_fortunes&quot; title=&quot;PostgreSQL rc.d script outputting fortunes&quot;&gt;PostgreSQL rc.d script outputting fortunes&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:47, 20 December 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Tykling</name></author>
	</entry>
	<entry>
		<id>https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=133&amp;oldid=prev</id>
		<title>Tykling at 09:23, 20 December 2009</title>
		<link rel="alternate" type="text/html" href="https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=133&amp;oldid=prev"/>
		<updated>2009-12-20T09:23:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:23, 20 December 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category:postgres]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I&amp;#039;ve been having a weird problem with the postgresql rc.d script in a FreeBSD jail. I finally figured out today how to fix it and wanted to put it on here so I dont forget.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I&amp;#039;ve been having a weird problem with the postgresql rc.d script in a FreeBSD jail. I finally figured out today how to fix it and wanted to put it on here so I dont forget.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tykling</name></author>
	</entry>
	<entry>
		<id>https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=132&amp;oldid=prev</id>
		<title>Tykling: /* The solution */</title>
		<link rel="alternate" type="text/html" href="https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=132&amp;oldid=prev"/>
		<updated>2009-12-20T09:22:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;The solution&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:22, 20 December 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;And now I don&amp;#039;t get the any tips when using the postgresql rc.d script:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;And now I don&amp;#039;t get the any tips when using the postgresql rc.d script:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[root@wackbox163 /usr/local/pgsql]# /usr/local/etc/rc.d/postgresql restart&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[root@wackbox163 /usr/local/pgsql]# /usr/local/etc/rc.d/postgresql restart&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;server stopped&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;server stopped&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[root@wackbox163 /usr/local/pgsql]#&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[root@wackbox163 /usr/local/pgsql]#&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Explanation ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Explanation ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This happens because the postgresql rc.d script switches user to the postgresql &amp;#039;&amp;#039;pgsql&amp;#039;&amp;#039; user before executing the actual start/stop commands. For some reason, and only on this specific machine, the user switch with su called &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; which in turn ran the fortune system.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This happens because the postgresql rc.d script switches user to the postgresql &amp;#039;&amp;#039;pgsql&amp;#039;&amp;#039; user before executing the actual start/stop commands. For some reason, and only on this specific machine, the user switch with su called &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; which in turn ran the fortune system.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tykling</name></author>
	</entry>
	<entry>
		<id>https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=131&amp;oldid=prev</id>
		<title>Tykling: Created page with &#039;I&#039;ve been having a weird problem with the postgresql rc.d script in a FreeBSD jail. I finally figured out today how to fix it and wanted to put it on here so I dont forget.  == T…&#039;</title>
		<link rel="alternate" type="text/html" href="https://tyk.wiki/index.php?title=PostgreSQL_rc.d_script_outputting_fortunes&amp;diff=131&amp;oldid=prev"/>
		<updated>2009-12-20T09:22:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;I&amp;#039;ve been having a weird problem with the postgresql rc.d script in a FreeBSD jail. I finally figured out today how to fix it and wanted to put it on here so I dont forget.  == T…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I&amp;#039;ve been having a weird problem with the postgresql rc.d script in a FreeBSD jail. I finally figured out today how to fix it and wanted to put it on here so I dont forget.&lt;br /&gt;
&lt;br /&gt;
== The problem == &lt;br /&gt;
Whenever I call the postgresql rc.d script to start/stop/restart/whatever the postgres server I would get a fortune from freebsd-tips like when you log in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@wackbox163 /usr/local/pgsql]# /usr/local/etc/rc.d/postgresql restart&lt;br /&gt;
Any user that is a member of the wheel group can use &amp;quot;su -&amp;quot; to simulate&lt;br /&gt;
a root login. You can add a user to the wheel group by editing /etc/group.&lt;br /&gt;
                -- Konstantinos Konstantinidis &amp;lt;kkonstan@duth.gr&amp;gt;&lt;br /&gt;
server stopped&lt;br /&gt;
[root@wackbox163 /usr/local/pgsql]#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The solution ==&lt;br /&gt;
I have been completely unable to figure out why this was happening, until a friend of mine reminded me to check .profile. I opened up &amp;#039;&amp;#039;/usr/local/pgsql/.profile&amp;#039;&amp;#039; and commented out the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[ -x /usr/games/fortune ] &amp;amp;&amp;amp; /usr/games/fortune freebsd-tips&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now I don&amp;#039;t get the any tips when using the postgresql rc.d script:&lt;br /&gt;
[root@wackbox163 /usr/local/pgsql]# /usr/local/etc/rc.d/postgresql restart&lt;br /&gt;
server stopped&lt;br /&gt;
[root@wackbox163 /usr/local/pgsql]#&lt;br /&gt;
&lt;br /&gt;
== Explanation ==&lt;br /&gt;
This happens because the postgresql rc.d script switches user to the postgresql &amp;#039;&amp;#039;pgsql&amp;#039;&amp;#039; user before executing the actual start/stop commands. For some reason, and only on this specific machine, the user switch with su called &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; which in turn ran the fortune system.&lt;/div&gt;</summary>
		<author><name>Tykling</name></author>
	</entry>
</feed>