<?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>Musings of an Apple Systems Administrator</title>
	<atom:link href="http://www.jonsblog.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonsblog.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 13 May 2012 17:41:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Export OSX Wiki Server to CSV</title>
		<link>http://www.jonsblog.org/2012/05/12/export-osx-wiki-server-to-csv/</link>
		<comments>http://www.jonsblog.org/2012/05/12/export-osx-wiki-server-to-csv/#comments</comments>
		<pubDate>Sat, 12 May 2012 16:42:57 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Bash Scripts]]></category>
		<category><![CDATA[Wiki Server]]></category>
		<category><![CDATA[bash script]]></category>
		<category><![CDATA[wiki]]></category>
		<category><![CDATA[wiki server]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=501</guid>
		<description><![CDATA[Recently our Organization has grown to immense size and we are starting to outgrow the 10.6 Wiki server that we use primarily for our intranet. I have been looking at the 10.7 wiki server however it is not much better, our intranet has been plagued with bouts of corruption and plist issues that have caused slow load times, and extreme data loss. Its pretty clear that we need to move to a more stable information storage media. We have looked at Wordpress and Drupal for this functionality  however the biggest issue is getting the data from the Wiki Server into one of these installations. I noticed that both Drupal and Wordpress have many plugins or modules that offer the ability to import content from CSV however getting a Wiki Server content set into CSV is not as easy as it sounds.]]></description>
			<content:encoded><![CDATA[<p>Recently our Organization has grown to immense size and we are starting to outgrow the 10.6 Wiki server that we use primarily for our intranet. I have been looking at the 10.7 wiki server however it is not much better, our intranet has been plagued with bouts of corruption and plist issues that have caused slow load times, and extreme data loss. Its pretty clear that we need to move to a more stable information storage media. We have looked at WordPress and Drupal for this functionality  however the biggest issue is getting the data from the Wiki Server into one of these installations. I noticed that both Drupal and WordPress have many plugins or modules that offer the ability to import content from CSV however getting a Wiki Server content set into CSV is not as easy as it sounds.</p>
<p>I found this <a href="http://maymay.net/blog/2008/09/22/extract-list-of-all-apple-wikiserver-wiki-titles-into-csv-format/">script</a> which works great at extracting the information that is stored in the plist file in each of the page folders in the Wiki structure. However grabbing the content out of the page.html file stored in each .page folder was what I was looking to do. I wrote a helper script that recursively copies and runs the script with a few modifications and then exports all the data I wanted to CSV. The script then copies the CSV files to the main export folder and then deletes all the files that it created in the WIki Server structure.</p>
<p><strong>Usage</strong></p>
<p><strong></strong>To use this script you must copy the folder and all three of the scripts inside it to the root level of your Server HD. Each script has a variable you must set, once you have set the initial path of your Wiki Deployment and the base URL structure you need to make the files executable. You can do this by</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">700</span> <span style="color: #660033;">-R</span> <span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">export</span></pre></td></tr></table></div>

<p>this should make the scripts executable. Once done you need to run the run.sh script with sudo. This will trigger the export. This is no where near perfect so I have opened up a <a href="https://github.com/jonbrown21/OSX-Wiki-2-CSV">GitHub</a> repository for the changes that I have made, and the addition to the helper script that runs these recursively. This also exports content in user blogs as well.</p>
<p>The one challenge I am having is running the script that exports the page.html file content and keeping the encoding at utf-8 so that I don&#8217;t get any artifacts or odd characters.</p>
<p>Here are the scripts</p>
<p><strong>Run.sh</strong><span id="more-501"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##### CONFIGURE HERE ########</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># put your full path to your collaboration files</span>
&nbsp;
<span style="color: #007800;">fullpath</span>=<span style="color: #000000; font-weight: bold;">/</span>Wiki<span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>Collaboration
&nbsp;
<span style="color: #666666; font-style: italic;">##### END CONFIGURATION #####</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">users</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>users<span style="color: #000000; font-weight: bold;">/</span>blogs
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">groups</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>groups<span style="color: #000000; font-weight: bold;">/</span>blogs
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>groups<span style="color: #000000; font-weight: bold;">/</span>wikis
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>export-blog.sh <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>export.sh <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Export Group Wikis</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>
.<span style="color: #000000; font-weight: bold;">/</span>export.sh
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>groups<span style="color: #000000; font-weight: bold;">/</span>wikis<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>wikipages.csv <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>groups<span style="color: #000000; font-weight: bold;">/</span>wikis<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>wikipages.csv
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>export.sh
&nbsp;
<span style="color: #666666; font-style: italic;"># Export Group Blogs</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>
.<span style="color: #000000; font-weight: bold;">/</span>export-blog.sh
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>groups<span style="color: #000000; font-weight: bold;">/</span>blogs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>wikipages.csv <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>groups<span style="color: #000000; font-weight: bold;">/</span>blogs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>wikipages.csv
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>export-blog.sh
&nbsp;
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">do</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Export User Blogs</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>export-blog.sh <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>
.<span style="color: #000000; font-weight: bold;">/</span>export-blog.sh
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>users<span style="color: #000000; font-weight: bold;">/</span>blogs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>wikipages.csv <span style="color: #000000; font-weight: bold;">/</span>export<span style="color: #000000; font-weight: bold;">/</span>users<span style="color: #000000; font-weight: bold;">/</span>blogs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>wikipages.csv
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$fullpath</span><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/</span>weblog<span style="color: #000000; font-weight: bold;">/</span>export-blog.sh
&nbsp;
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>

<p><strong>export.sh</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh - </span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Script to extract data from an Apple WikiServer's data store by querying the</span>
<span style="color: #666666; font-style: italic;"># filesystem itself. Creates a 'wikipages.csv' file that's readable by any</span>
<span style="color: #666666; font-style: italic;"># spreadsheeting application, such as Numbers.app or Microsoft Excel.app.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># USAGE:   To use this script, change to the WikiServer's pages directory, then</span>
<span style="color: #666666; font-style: italic;">#          just run this script. A file named wikipages.csv will be created in</span>
<span style="color: #666666; font-style: italic;">#          your current directory. For instance:</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#              cd /Library/Collaboration/Groups/mygroup/wiki  # dir to work in</span>
<span style="color: #666666; font-style: italic;">#              wikipages2csv.sh                               # run the script</span>
<span style="color: #666666; font-style: italic;">#              cp wikipages.csv ~/Desktop                     # save output</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># WARNING: Since the WikiServer's files are only accessible as root, this script</span>
<span style="color: #666666; font-style: italic;">#          must be run as root to function. Additionally, this is not extremely</span>
<span style="color: #666666; font-style: italic;">#          well tested, so use at your own risk.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Author:  Meitar Moscovitz</span>
<span style="color: #666666; font-style: italic;"># Date:    Mon Sep 22 15:03:54 EST 2008</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##### CONFIGURE HERE ########</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># The prefix to append to generated links. NO SPACES!</span>
<span style="color: #007800;">WS_URI_PREFIX</span>=http:<span style="color: #000000; font-weight: bold;">//</span>my-server.example.com<span style="color: #000000; font-weight: bold;">/</span>groups<span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##### END CONFIGURATION #####</span>
<span style="color: #666666; font-style: italic;"># DO NOT EDIT PAST THIS LINE</span>
<span style="color: #666666; font-style: italic;">#############################</span>
&nbsp;
<span style="color: #007800;">WS_CSV_OUTFILE</span>=wikipages.csv
<span style="color: #007800;">WS_PAGE_IDS_FILE</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">mktemp</span> ws-ids.tmp.XXXXXX<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> extractPlistValueByKey <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> \
      $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">expr</span> <span style="color: #000000;">1</span> + <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;&lt;key&gt;$1&lt;/key&gt;&quot;</span> page.plist <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">':'</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> page.plist <span style="color: #000000; font-weight: bold;">|</span> \
        <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">'&gt;'</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">'&lt;'</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> linkifyWikiServerTitle <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/ /_/g'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/&amp;amp;/_/g'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/&amp;gt;/_/g'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/&amp;lt;/_/g'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/\?//g'</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> formatISO8601date <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/T/ /'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/Z$//'</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> csvQuote <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-q</span> <span style="color: #ff0000;">','</span> <span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #666666; font-style: italic;"># if there are commas in the string</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'&quot;'</span><span style="color: #ff0000;">&quot;$1&quot;</span><span style="color: #ff0000;">'&quot;'</span>   <span style="color: #666666; font-style: italic;"># quote the value</span>
    <span style="color: #000000; font-weight: bold;">else</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1&quot;</span>         <span style="color: #666666; font-style: italic;"># just output the as it was received</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #007800;">PSTALLY</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> ^l <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> -l<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$PSTALLY</span> <span style="color: #660033;">-gt</span> <span style="color: #000000;">4</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-d</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>^<span style="color: #c20cb9; font-weight: bold;">w</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #000000; font-weight: bold;">*</span>.page <span style="color: #000000; font-weight: bold;">|</span> \
  <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/^\([a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]\)\.page$/\1/'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$WS_PAGE_IDS_FILE</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Title,ID,Date Created,Last Modified,URI,Content&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$WS_CSV_OUTFILE</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #c20cb9; font-weight: bold;">id</span>; <span style="color: #000000; font-weight: bold;">do</span>
&nbsp;
    <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$id</span>.page
    <span style="color: #007800;">title</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(extractPlistValueByKey title)</span>&quot;</span>
    <span style="color: #007800;">created_date</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(formatISO8601date $(extractPlistValueByKey createdDate)</span>)&quot;</span>
    <span style="color: #007800;">modified_date</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(formatISO8601date $(extractPlistValueByKey modifiedDate)</span>)&quot;</span>
    <span style="color: #007800;">link</span>=<span style="color: #007800;">$WS_URI_PREFIX</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">$id</span>&quot;</span><span style="color: #000000; font-weight: bold;">/`</span>linkifyWikiServerTitle <span style="color: #ff0000;">&quot;<span style="color: #007800;">$title</span>&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.html
    <span style="color: #007800;">FILE_DATA</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">cat</span> page.html <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #ff0000;">','</span> <span style="color: #ff0000;">' '</span><span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #7a0874; font-weight: bold;">cd</span> ..
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">`</span>csvQuote <span style="color: #ff0000;">&quot;<span style="color: #007800;">$title</span>&quot;</span><span style="color: #000000; font-weight: bold;">`</span>,<span style="color: #007800;">$id</span>,<span style="color: #007800;">$created_date</span>,<span style="color: #007800;">$modified_date</span>,<span style="color: #000000; font-weight: bold;">`</span>csvQuote <span style="color: #ff0000;">&quot;<span style="color: #007800;">$link</span>&quot;</span><span style="color: #000000; font-weight: bold;">`</span>,<span style="color: #ff0000;">&quot;<span style="color: #007800;">$FILE_DATA</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$WS_CSV_OUTFILE</span>
<span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #007800;">$WS_PAGE_IDS_FILE</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$WS_PAGE_IDS_FILE</span></pre></td></tr></table></div>

<p><strong>export-blog.sh</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh -</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Script to extract data from an Apple WikiServer's data store by querying the</span>
<span style="color: #666666; font-style: italic;"># filesystem itself. Creates a 'wikipages.csv' file that's readable by any</span>
<span style="color: #666666; font-style: italic;"># spreadsheeting application, such as Numbers.app or Microsoft Excel.app.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># USAGE:   To use this script, change to the WikiServer's pages directory, then</span>
<span style="color: #666666; font-style: italic;">#          just run this script. A file named wikipages.csv will be created in</span>
<span style="color: #666666; font-style: italic;">#          your current directory. For instance:</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#              cd /Library/Collaboration/Groups/mygroup/wiki  # dir to work in</span>
<span style="color: #666666; font-style: italic;">#              wikipages2csv.sh                               # run the script</span>
<span style="color: #666666; font-style: italic;">#              cp wikipages.csv ~/Desktop                     # save output</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># WARNING: Since the WikiServer's files are only accessible as root, this script</span>
<span style="color: #666666; font-style: italic;">#          must be run as root to function. Additionally, this is not extremely</span>
<span style="color: #666666; font-style: italic;">#          well tested, so use at your own risk.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Author:  Meitar Moscovitz</span>
<span style="color: #666666; font-style: italic;"># Date:    Mon Sep 22 15:03:54 EST 2008</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##### CONFIGURE HERE ########</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># The prefix to append to generated links. NO SPACES!</span>
<span style="color: #007800;">WS_URI_PREFIX</span>=http:<span style="color: #000000; font-weight: bold;">//</span>my-server.example.com<span style="color: #000000; font-weight: bold;">/</span>groups<span style="color: #000000; font-weight: bold;">/</span>wiki<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##### END CONFIGURATION #####</span>
<span style="color: #666666; font-style: italic;"># DO NOT EDIT PAST THIS LINE</span>
<span style="color: #666666; font-style: italic;">#############################</span>
&nbsp;
<span style="color: #007800;">WS_CSV_OUTFILE</span>=wikipages.csv
<span style="color: #007800;">WS_PAGE_IDS_FILE</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">mktemp</span> ws-ids.tmp.XXXXXX<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> extractPlistValueByKey <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> \
      $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">expr</span> <span style="color: #000000;">1</span> + <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;&lt;key&gt;$1&lt;/key&gt;&quot;</span> page.plist <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">':'</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> page.plist <span style="color: #000000; font-weight: bold;">|</span> \
        <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">'&gt;'</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">'&lt;'</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> linkifyWikiServerTitle <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/ /_/g'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/&amp;amp;/_/g'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/&amp;gt;/_/g'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/&amp;lt;/_/g'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/\?//g'</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> formatISO8601date <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/T/ /'</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/Z$//'</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> csvQuote <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-q</span> <span style="color: #ff0000;">','</span> <span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$?</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #666666; font-style: italic;"># if there are commas in the string</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'&quot;'</span><span style="color: #ff0000;">&quot;$1&quot;</span><span style="color: #ff0000;">'&quot;'</span>   <span style="color: #666666; font-style: italic;"># quote the value</span>
    <span style="color: #000000; font-weight: bold;">else</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1&quot;</span>         <span style="color: #666666; font-style: italic;"># just output the as it was received</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-d</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>^<span style="color: #c20cb9; font-weight: bold;">w</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #000000; font-weight: bold;">*</span>.page <span style="color: #000000; font-weight: bold;">|</span> \
  <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/^\([a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]\)\.page$/\1/'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$WS_PAGE_IDS_FILE</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Title,ID,Date Created,Last Modified,URI,Content&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$WS_CSV_OUTFILE</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #c20cb9; font-weight: bold;">id</span>; <span style="color: #000000; font-weight: bold;">do</span>
&nbsp;
    <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$id</span>.page
    <span style="color: #007800;">title</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(extractPlistValueByKey title)</span>&quot;</span>
    <span style="color: #007800;">created_date</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(formatISO8601date $(extractPlistValueByKey createdDate)</span>)&quot;</span>
    <span style="color: #007800;">modified_date</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(formatISO8601date $(extractPlistValueByKey modifiedDate)</span>)&quot;</span>
    <span style="color: #007800;">link</span>=<span style="color: #007800;">$WS_URI_PREFIX</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">$id</span>&quot;</span><span style="color: #000000; font-weight: bold;">/`</span>linkifyWikiServerTitle <span style="color: #ff0000;">&quot;<span style="color: #007800;">$title</span>&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.html
    <span style="color: #007800;">FILE_DATA</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">cat</span> page.html <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #ff0000;">','</span> <span style="color: #ff0000;">' '</span><span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #7a0874; font-weight: bold;">cd</span> ..
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000; font-weight: bold;">`</span>csvQuote <span style="color: #ff0000;">&quot;<span style="color: #007800;">$title</span>&quot;</span><span style="color: #000000; font-weight: bold;">`</span>,<span style="color: #007800;">$id</span>,<span style="color: #007800;">$created_date</span>,<span style="color: #007800;">$modified_date</span>,<span style="color: #000000; font-weight: bold;">`</span>csvQuote <span style="color: #ff0000;">&quot;<span style="color: #007800;">$link</span>&quot;</span><span style="color: #000000; font-weight: bold;">`</span>,<span style="color: #ff0000;">&quot;<span style="color: #007800;">$FILE_DATA</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$WS_CSV_OUTFILE</span>
<span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #007800;">$WS_PAGE_IDS_FILE</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$WS_PAGE_IDS_FILE</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2012/05/12/export-osx-wiki-server-to-csv/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10.7 Server throttle high CPU usage script</title>
		<link>http://www.jonsblog.org/2012/04/08/10-7-server-throttle-high-cpu-usage-script/</link>
		<comments>http://www.jonsblog.org/2012/04/08/10-7-server-throttle-high-cpu-usage-script/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 18:46:16 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Bash Scripts]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[bash scripts]]></category>
		<category><![CDATA[OSX Lion]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=497</guid>
		<description><![CDATA[For the last two years, I have noticed a trend. From time to time Apple will release updates to its OSX Server environment, sometimes these updates go smoothly however the bulk of the time it causes several nasty side affects one of them being high CPU usage among rogue processes.]]></description>
			<content:encoded><![CDATA[<p>For the last two years, I have noticed a trend. From time to time Apple will release updates to its OSX Server environment, sometimes these updates go smoothly however the bulk of the time it causes several nasty side affects one of them being high CPU usage among rogue processes. One such was covered here the <a title="10.6.8 Server high CPU usage, hwmond culprit" href="http://www.jonsblog.org/2011/07/10/10-6-8-server-high-cpu-usage-hwmond-culprit/">HWMOD bug</a> which caused extremely high CPU usage. Sometimes these are easy to fix while other times these cause your system to crash and burn due to high CPU usage. On the flip side of this coin I have had several experiences with services on the OSX Platform that when they are corrupt or start having issues that specific service will shoot up over 100% CPU while struggling to complete a specific task. Examples include but are not limited to a corrupt open directory master trying to replicate will cause the password service to shoot up over 100% CPU and poor PHP programming can cause the HTTP service to do the same.</p>
<p>I needed a way for my server to notify me by email every time there was a potential problem which results in high CPU usage so that I could mitigate that issue quickly. The server monitor and server admin apps do not allow you to monitor CPU usage and Activity monitor is great as long as you are willing to stand in front of your terminal screen all day. I decided to write a script that would alert me when specific processes started running wild.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">processToWatch</span>=<span style="color: #ff0000;">&quot;PasswordService&quot;</span> <span style="color: #666666; font-style: italic;"># in my case I need to watch convert</span>
<span style="color: #007800;">emailAddress</span>=<span style="color: #ff0000;">&quot;me@me.com&quot;</span> <span style="color: #666666; font-style: italic;"># this is my main emailaddress</span>
<span style="color: #007800;">triggerValue</span>=<span style="color: #000000;">10</span> <span style="color: #666666; font-style: italic;"># if the CPU use is above 50% send an email. DO NOT USE a DOT or COMMA!</span>
<span style="color: #007800;">tempFileName</span>=cpulog <span style="color: #666666; font-style: italic;"># some name of the temp file for the ps, grep data</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">ps</span> auxww <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$processToWatch</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>Scripts<span style="color: #000000; font-weight: bold;">/</span>Logs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$tempFileName</span>
<span style="color: #7a0874; font-weight: bold;">export</span> LINE
<span style="color: #7a0874; font-weight: bold;">&#40;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> LINE
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$LINE</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">$LINE</span>
<span style="color: #c20cb9; font-weight: bold;">read</span> LINE
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$3&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/\.[0-9]*//g'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #660033;">-gt</span> <span style="color: #007800;">$triggerValue</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">kill</span> <span style="color: #660033;">-9</span> <span style="color: #007800;">$2</span>;
mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;CPU message alert for: <span style="color: #007800;">$processToWatch</span>&quot;</span> <span style="color: #007800;">$emailAddress</span> <span style="color: #cc0000; font-style: italic;">&lt;&lt;-END
This is to inform you that the following process: $processToWatch with PID (Process ID) $2 is now using more than your preset $triggerValue value.
&nbsp;
Process: $processToWatch is using: $3 of CPU
The command used is: $11
END</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>Scripts<span style="color: #000000; font-weight: bold;">/</span>Logs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$tempFileName</span></pre></td></tr></table></div>

<p><span id="more-497"></span><br />
The above script will notify me of an issue with the PasswordService and alert me. This has worked out great for me since I only care about a specific service on one server at a time. I can set the time variable in the script to warn me at a specific interval and I use a cron job to schedule the task. I usually have it running every 5 minutes. If you need help with the cron job you can refer to my past post on <a href="http://www.jonsblog.org/2010/05/31/iii-syncing-a-failover-website-scheduling-the-sync/" title="III Syncing a failover website : Scheduling the sync">scheduling tasks on servers using Cron.</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2012/04/08/10-7-server-throttle-high-cpu-usage-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10.7 Web Server Admin Alternatives</title>
		<link>http://www.jonsblog.org/2012/01/11/10-7-web-server-admin-alternatives/</link>
		<comments>http://www.jonsblog.org/2012/01/11/10-7-web-server-admin-alternatives/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 19:30:54 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[musings]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=488</guid>
		<description><![CDATA[If you are using 10.7 server to administer any sort of website then you may have noticed that Apple has removed the bulk of the administration capabilities once found in the Server Admin app, and shifted a tiny fraction of that functionality to the Server app. Now one could speculate that if indeed Apple is shifting to a home server market, and it is currently frowned upon to run a robust website over a shared internet connection from ones living room that Apple may have done this to discourage users from using their new OS for that reason, however for those of us who need to run websites on 10.7 for our job or because we absolutely love OSX Servers then there are a few alternatives. ]]></description>
			<content:encoded><![CDATA[<p>If you are using 10.7 server to administer any sort of website then you may have noticed that Apple has removed the bulk of the administration capabilities once found in the Server Admin app, and shifted a tiny fraction of that functionality to the Server app. Now one could speculate that if indeed Apple is shifting to a home server market, and it is currently frowned upon to run a robust website over a shared internet connection from ones living room that Apple may have done this to discourage users from using their new OS for that reason, however for those of us who need to run websites on 10.7 for our job or because we absolutely love OSX Servers then there are a few alternatives.</p>
<p>I have been playing around with two pieces of software that promise to help bring back this lost functionality in an easy to use GUI tool and perhaps even restore a little sanity to running a website on Lion. The first application that I reviewed was called <a title="VirtualHostX" href="http://clickontyler.com/virtualhostx/" target="_blank">VirtualHostX</a>.</p>
<blockquote><p>VirtualHostX 3.0 is the easiest way to host and share multiple websites on your Mac. It&#8217;s the perfect solution for web designers working on more than one project at a time. (Aren&#8217;t we all?) No more nesting folders or asking the programmer across the cubicle for help. With VirtualHostX you can easily create and manage Apache virtual hosts with just a few clicks.</p></blockquote>
<p>The other feature that I love about this tool is that you can share a private webpage or site that you are working on, that is not publicly available and share it with anyone publicly through a secure password protected connection. This is great if you need to show people updates of your site and their not on the local subnet. This tool allows you to code custom directives (If you need a list you can check out my last post <a title="10.7 Server Web Administration: Missing Manual" href="http://www.jonsblog.org/2011/12/09/10-7-server-web-administration-missing-manual/">Missing Manual</a>). </p>
<p><img class="size-full wp-image-489 aligncenter" title="" src="http://www.jonsblog.org/wp-content/uploads/2012/01/vhx3-ss1.png" alt="" width="460" height="337" /><span id="more-488"></span></p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-491" title="vhx3-ss4" src="http://www.jonsblog.org/wp-content/uploads/2012/01/vhx3-ss4.png" alt="" width="460" height="347" /></p>
<p>Out of the box this product works with popular platforms like WordPress and it uses the built in Apache that comes with OSX. Alternatively you can even set it to manage any instance of apache on your server.</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-490" title="vhx3-ss3" src="http://www.jonsblog.org/wp-content/uploads/2012/01/vhx3-ss3.png" alt="" width="444" height="260" /></p>
<p>Lastly you can even backup the changes that it makes to your system so that you can performa  seamless migration or just for your own peace of mind. I love this software and its an amazing alternative to using the Server app.</p>
<p>The other tool that I found that handles Apache administration on 10.7 is <a title="WebMon" href="http://cutedgesystems.com/software/WebMonForLion/" target="_blank">WebMon</a>. Webmon does not look as cool as VirtualHostX however it does have greater support for Custom Directives out of the box in the form of GUI interface.</p>
<blockquote><p>WebMon configures OS X&#8217;s built-in web server to support server-side includes, execCGI, PHP, SSL (including support for inserting Intermediate CA certs) and WebDAV, for multiple domains running on the same server.</p>
<p>With WebDAV turned on, your web server <a href="http://cutedgesystems.com/software/WebMonForLion/#iDisk">acts like an iDisk</a>, allowing you to connect to the WebDAV folder remotely, securely, and directly from the Finder, so you can save, share, and distribute your files and folders. You can also use the WebDAV folder to <a href="http://cutedgesystems.com/software/WebMonForLion/#iCal">share your iCal calendars</a>.</p>
<p>WebMon also helps you set up the web server so that you can <a href="http://cutedgesystems.com/software/WebMonForLion/#log">monitor its log file</a> from a remote machine. WebMon is able to help you monitor any number of web servers from a single remote machine.</p></blockquote>
<p>With WebMon you can setup and manage SSL Certificates, turn on CGI Support and much much more. This tool certainly restores almost all of the lost functionality . If you run multiple Web Servers than you might also like its built in monitoring service that makes sure that Apache is running soundly on other systems.</p>
<p>The great thing about both of these solutions is that they work well together, so you can use both or one of them but for the beginner web server administrator these tools restore a little more control when it comes to Apache administration.</p>
<p>I hope that you all found this article and walkthrough educational, as always please feel free to interact with me by posting questions and comments and I will answer them as best as I can. If you feel like any of this is wrong or could be improved upon also please leave a comment below, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2012/01/11/10-7-web-server-admin-alternatives/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10.7 Server Web Administration: Missing Manual</title>
		<link>http://www.jonsblog.org/2011/12/09/10-7-server-web-administration-missing-manual/</link>
		<comments>http://www.jonsblog.org/2011/12/09/10-7-server-web-administration-missing-manual/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 00:44:04 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[10.7]]></category>
		<category><![CDATA[manual]]></category>
		<category><![CDATA[OSX Lion]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=474</guid>
		<description><![CDATA[I just started using 10.7 Lion Server at my organization and I have to admit it is nice in some ways and infuriating in others. Apple has certainly fixed and introduced quite a few new features such as Profile Manager but have removed features like Mobile Access. The hardest hit service in my opinion when it comes to 10.7 server administration is the Web service. Apple has stripped this service completely out of the Server Admin app and has added a dumbed down version of the service to the Server app. If your unfamiliar the Server app is a program called "Server" that has the worst possible GUI interface and the least possible settings for all services that run through it which is a shame.]]></description>
			<content:encoded><![CDATA[<p>I just started using 10.7 Lion Server at my organization and I have to admit it is nice in some ways and infuriating in others. Apple has certainly fixed and introduced quite a few new features such as Profile Manager but have removed features like Mobile Access. The hardest hit service in my opinion when it comes to 10.7 server administration is the Web service. Apple has stripped this service completely out of the Server Admin app and has added a dumbed down version of the service to the Server app. If your unfamiliar the Server app is a program called &#8220;Server&#8221; that has the worst possible GUI interface and the least possible settings for all services that run through it which is a shame.</p>
<p>The purpose of this entry is to talk about 10.7 server and show you how to accomplish everything that you could accomplish from the Server Admin application through commands using terminal or edits to system files in the operating system. Everything below requires that you be logged in as the root user on the server in order to avoid permission issues.</p>
<p><strong>How to enable PHP </strong><br />
Run this command to check if PHP is enabled on 10.7 server.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd.conf<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> libphp5.so</pre></td></tr></table></div>

<p>If the output is</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">LoadModule php5_module libexec<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>libphp5.so</pre></td></tr></table></div>

<p>and not</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#LoadModule php5_module libexec/apache2/libphp5.so</span></pre></td></tr></table></div>

<p>then PHP is enabled. If it is the other way around with a # in the beginning of the line you can just edit the httpd.conf file manually with</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></td></tr></table></div>

<p>and remove the bracket manually and then restart the web server with</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p>Alternatively you can also enable this via a checkbox in the terrible server.app in 10.7.</p>
<p><strong>How to change the default file type </strong><br />
By default the landing page on all new sites is index.html if you would like to change this or the order in which a webpage searches for the index page then you need to change the default file type.<span id="more-474"></span></p>
<p>To do this edit the configuration file appropriate to your site name. Meaning you have to have already configured a site in the 10.7 server.app program once you have a site then you need to edit the site configuration file. If your site was called apple.com then your site configuration would be in /etc/apache2/sites/apple.com.conf or something like that.</p>
<p>You need to edit that file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>look for the following in the file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_dir.c<span style="color: #000000; font-weight: bold;">&gt;</span>
    DirectoryIndex index.html
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>If you want to change the main page to index.php instead of index.html then replace index.html with index.php. If you want to add it as a secondary load page then you can change it to this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_dir.c<span style="color: #000000; font-weight: bold;">&gt;</span>
    DirectoryIndex index.html index.php
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>once done save and restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to enable .htaccess </strong><br />
If you are going to be using mod_rewwrite at all for redirects or pretty permalinks (which is very common now) then you need to have this enabled. Again as stated before you have to have a site setup on the server through the server.app program. Once done locate your configuration file as outlined above and make the following changes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>Once your in the file look for something that looks similar to the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>Directory <span style="color: #ff0000;">&quot;/Users/yourname/Sites/&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
     Options Indexes +MultiViews
     AllowOverride All
     Order allow,deny
     Allow from All
<span style="color: #000000; font-weight: bold;">&lt;/</span>Directory<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>It won&#8217;t look exactly the same but what you want to do is replace it with what you see above that will enable the .htaccess or mod_rewrite the line of code that actually does this is the &#8220;AllowOverride All&#8221; command. </p>
<p><strong>How to enable WebDav</strong><br />
To configure WebDAV Sharing for such users, follow these instructions before enabling any WebDAV share points.</p>
<p>Note: The instructions in this article include editing configuration files. You must have root access to edit these files. You should make a backup copy of each file prior to editing it.</p>
<p>This step is optional but highly recommended: Acquire and install a trusted SSL certificate, and use Server App to configure Web Service to use the certificate. You can use the server&#8217;s default, self-signed certificate for WebDAV Sharing, but iWork and other applications may warn that the certificate is &#8220;invalid&#8221;.</p>
<p>You need to edit the following configuration file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd_webdavsharing.conf</pre></td></tr></table></div>

<p>Find the line &#8220;AuthType Digest&#8221; change Digest to Basic. This makes WebDAV Sharing use Basic authentication, which is required for Active Directory users.</p>
<p>Now edit this configuration file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>webapps<span style="color: #000000; font-weight: bold;">/</span>com.apple.webapp.webdavsharing.plist</pre></td></tr></table></div>

<p>find these lines</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>sslPolicy<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>integer<span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&lt;/</span>integer<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>Change the 0 to 1. This makes WebDAV Sharing require SSL, which is the only secure way to use Basic authentication. Advise users to configure the iWork clients on their iOS devices with an &#8220;https&#8221; WebDAV URL, like: https://example.com/webdav</p>
<p><strong>How to enable the directory listing </strong><br />
Again as stated before you have to have a site setup on the server through the server.app program. Once done locate your configuration file as outlined above and make the following changes. </p>
<p>You need to edit that file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>find the words &#8220;AllowOverride&#8221; in that block where these words are you need to add this line. This line may already be in your file but it may be different simply update it to reflect these changes</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Options <span style="color: #660033;">-Indexes</span> FollowSymLinks</pre></td></tr></table></div>

<p><strong>How to enable SSI</strong><br />
If you need to use Server Side Includes in your scripts or website files then do the following to enable it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></td></tr></table></div>

<p>look for these lines</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># AddType text/html .shtml</span>
<span style="color: #666666; font-style: italic;"># AddHandler server-parsed .shtml</span></pre></td></tr></table></div>

<p>Uncomment those 2 lines (remove the # in front of each of them). Now look in the same file for the following</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Options FollowSymLinks</pre></td></tr></table></div>

<p>Add &#8220;Includes&#8221; to the 2nd line so it looks like</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Options FollowSymLinks Includes</pre></td></tr></table></div>

<p>save the file and restart apache</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to enable VHOSTS</strong><br />
VHOSTS or Virtual Hosts enable you to have multiple domain names mapped to the same site or IP address. To enable this edit the httpd.conf file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></td></tr></table></div>

<p>find this line</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#Include /private/etc/apache2/extra/httpd-vhosts.conf</span></pre></td></tr></table></div>

<p>change it to</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">Include <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>extra<span style="color: #000000; font-weight: bold;">/</span>httpd-vhosts.conf</pre></td></tr></table></div>

<p>this will effectively enable VHOSTS. Now you should restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to enable CGI</strong><br />
Again as stated before you have to have a site setup on the server through the server.app program. Once done locate your configuration file as outlined above and make the following changes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>Once your in the file look for something that looks similar to the following.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">     Options Indexes +MultiViews</pre></td></tr></table></div>

<p>It won&#8217;t look exactly the same but what need to do is add &#8220;-ExecCGI&#8221; after &#8220;+MultiViews&#8221; it should look something like this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">     Options Indexes +MultiViews <span style="color: #660033;">-ExecCGI</span></pre></td></tr></table></div>

<p>This will enable CGI and allow you to run CGI scripts in Apache. Now you should restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to enable Logging</strong><br />
This one boggled my mind, by default website logging is not enabled and again there is no way to enable it in the GUI. You will want to have this enabled to catch errors and fix faulty code. To enable this again we are assuming you already have a site configured with the server.app program. Once done locate your configuration file as outlined above and make the following changes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>find the line &#8220;DocumentRoot&#8221;, Under that line paste the following</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">CustomLog <span style="color: #ff0000;">&quot;/var/log/apache2/access_log&quot;</span> combinedvhost
ErrorLog <span style="color: #ff0000;">&quot;/var/log/apache2/error_log&quot;</span></pre></td></tr></table></div>

<p>it should now look like this</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">DocumentRoot <span style="color: #ff0000;">&quot;/path/to/your/website/&quot;</span>
CustomLog <span style="color: #ff0000;">&quot;/var/log/apache2/access_log&quot;</span> combinedvhost
ErrorLog <span style="color: #ff0000;">&quot;/var/log/apache2/error_log&quot;</span></pre></td></tr></table></div>

<p>Now you should restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to add a domain alias</strong><br />
This is a common thing that most web admins do to map domains to a single site. This again has been removed from the functionality of the server.app on 10.7 server but is a pretty easy to add. To enable this again we are assuming you already have a site configured with the server.app program. Once done locate your configuration file as outlined above and make the following changes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites<span style="color: #000000; font-weight: bold;">/</span>nameofyoursite.conf</pre></td></tr></table></div>

<p>in the site definition file, look for a line that says</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">ServerName example.com
ServerAlias www.example.com</pre></td></tr></table></div>

<p>where example.com is the domain of your site. You can have more than one alias, just separate them by a spaces on the same line like so.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">ServerName example.com
ServerAlias www.example.com alias2.example.com alias3.example.com</pre></td></tr></table></div>

<p>Now you should restart apache.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p><strong>How to restore factory settings to 10.7 Web Service</strong><br />
This one is important. As stated above you should be backing up these config files before you edit them and then making your changes. In the event that something went wrong you can always reset them back to the original settings. </p>
<p>Run this command</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> serveradmin <span style="color: #7a0874; font-weight: bold;">command</span> web:<span style="color: #007800;">command</span>=restoreFactorySettings</pre></td></tr></table></div>

<p>I got this command by calling Apple directly they also suggested restarting the machine after the restore command, once the computer is back up turn off and then turn on web service to ensure it is working propperly.</p>
<p><strong>Conclusion</strong><br />
All of these commands allow you to leverage Apache and accomplish the tasks that were once easy to accomplish with the Server Admin tool in 10.6 server. There are two options here, learn to love the command line or do not upgrade to 10.7 Lion. Apple is streamlining their GUI interfaces for their tools however there is still power under the hood. Do not be afraid to re-configure these systems Apache, PHP and MYSQL can be installed, modified and improved all from the command line and in some cases they work better after you do. Its not time to quit in my opinion its time to roll up our sleeves and start learning the core of what makes an OSX server truly great and that starts with understanding the open source software that comes bundled with them.</p>
<p>I hope that you all found this article and walkthrough educational, as always please feel free to interact with me by posting questions and comments and I will answer them as best as I can. If you feel like any of this is wrong or could be improved upon also please leave a comment below, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/12/09/10-7-server-web-administration-missing-manual/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Stay off of blacklists: Limit postfix recipients</title>
		<link>http://www.jonsblog.org/2011/11/30/stay-off-of-blacklists-limit-postfix-recipients/</link>
		<comments>http://www.jonsblog.org/2011/11/30/stay-off-of-blacklists-limit-postfix-recipients/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 18:24:30 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=458</guid>
		<description><![CDATA[I have heard this story it seems over and over again, I also have been the topic of many email horror stories. They usually go like this

“I just setup a new server and within days we were on a corporate email blacklist, I contacted the company in question and asked why are we on your blacklist, why won’t you deliver our email. They shared with me an email log of thousands of emails being sent from my mail server through several legitimate email accounts. I ensured that my server was not an open relay so I asked these users, if they had indeed sent this many emails in one shot without any kind of unsubscribe link in the footer of their email. They had! I was so shocked, now what do I do?”

This is an uncomfortable and very perilous position. You want to allow your users to send email to get their job done however you as a systems administrator need to comply with the “Can Spam Act” passed by the FCC to ensure that email continues to flow. You also have companies out there who will block you for violating this act as a precaution on their part. All the while your users can not be bothered to learn about proper email procedures.]]></description>
			<content:encoded><![CDATA[<p>I have heard this story it seems over and over again, I also have been the topic of many email horror stories. They usually go like this</p>
<blockquote><p>&#8220;I just setup a new server and within days we were on a corporate email blacklist, I contacted the company in question and asked why are we on your blacklist, why won&#8217;t you deliver our email. They shared with me an email log of thousands of emails being sent from my mail server through several legitimate email accounts. I ensured that my server was not an open relay so I asked these users, if they had indeed sent this many emails in one shot without any kind of unsubscribe link in the footer of their email. They had! I was so shocked, now what do I do?&#8221;</p></blockquote>
<p>This is an uncomfortable and very perilous position. You want to allow your users to send email to get their job done however you as a systems administrator need to comply with the &#8220;Can Spam Act&#8221; passed by the FCC to ensure that email continues to flow. You also have companies out there who will block you for violating this act as a precaution on their part. All the while your users can not be bothered to learn about proper email procedures. </p>
<p>In my experience the only thing you can do at this point is to limit how many emails are allowed to be sent at any given time. If you are using OSX Server for Mail or Postfix for Sendmail then this walkthrough will talk about how to limit email recipients and stay off those dreaded blacklists.</p>
<p>Here are the basics that you should know, the following are all settings that can be added to the /etc/postfix/main.cf file of your postfix setup.</p>
<p><strong>smtpd_recipient_limit (default 1000)</strong> parameter controls how many recipients the SMTP server will take per message delivery request. You can&#8217;t restrict this to a to/cc/bcc field &#8211; <strong>it&#8217;s for all recipients</strong>. For that you&#8217;d have to use a regular expression in header_checks to arbitrarily limit the length of each header to something reasonable.</p>
<p><strong>smtpd_recipient_overshoot_limit (default 1000)</strong> The number of recipients that a remote SMTP client can send in excess of the hard limit specified with smtpd_recipient_limit, before the Postfix SMTP server increments the per-session error count for each excess recipient.</p>
<p><strong>smtpd_hard_error_limit (default 20)</strong> parameter to know at what number of errors it will disconnect. <span id="more-458"></span></p>
<p>So you technically need to consider the 3 values here which affect both inbound &amp; outbound mail. Then there&#8217;s the throttling tools.</p>
<p><strong>smtpd_client_recipient_rate_limit (default: 0 no limit)</strong> The maximum number of recipient addresses that an SMTP client may specify in the time interval specified via anvil_rate_time_unit (default: 60s -careful adjusting this affects other things)&#8221; and note that this is &#8220;regardless of whether or not Postfix actually accepts those recipients&#8221; Those over will receive a 450 4.7.1 Error: too many recipients from [the.client.ip.address] It&#8217;s up to the client to deliver those recipients at some later time.</p>
<p><strong>smtpd_client_connection_rate_limit (default: 0)</strong> The maximal number of connection attempts any client is allowed to make to this service per time unit. The time unit is specified with the anvil_rate_time_unit configuration parameter.</p>
<p><strong>smtpd_client_message_rate_limit (default: 0)</strong> The maximal number of message delivery requests that any client is allowed to make to this service per time unit, regardless of whether or not Postfix actually accepts those messages. The time unit is specified with the anvil_rate_time_unit configuration parameter.</p>
<p>The purpose of these features are to limit abuse, as opposed to regulating legitimate mail traffic, but I use them that way in order to mitigate spam blacklisting. In my organization we limit the recipients from one email to 25 you can see the code from my sample /etc/postfix/main.cf. If your file does not have these values you can add them to the bottom of the file.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">smtpd_recipient_limit = <span style="color: #000000;">50</span>
smtpd_recipient_overshoot_limit = <span style="color: #000000;">51</span>
smtpd_hard_error_limit = <span style="color: #000000;">20</span>
smtpd_client_recipient_rate_limit = <span style="color: #000000;">50</span>
smtpd_client_connection_rate_limit = <span style="color: #000000;">10</span>
smtpd_client_message_rate_limit = <span style="color: #000000;">25</span>
default_extra_recipient_limit = <span style="color: #000000;">50</span>
duplicate_filter_limit = <span style="color: #000000;">50</span>
default_destination_recipient_limit = <span style="color: #000000;">50</span>
smtp_destination_recipient_limit = <span style="color: #007800;">$default_destination_recipient_limit</span></pre></td></tr></table></div>

<p>Once done you need to restart postfix</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> postfix reload</pre></div></div>

<p>I hope that you all found this article and walkthrough educational, as always please feel free to interact with me by posting questions and comments and I will answer them as best as I can. If you feel like any of this is wrong or could be improved upon also please leave a comment below, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/11/30/stay-off-of-blacklists-limit-postfix-recipients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MYSQL on OSX Lion Server</title>
		<link>http://www.jonsblog.org/2011/11/28/installing-mysql-on-osx-lion-server/</link>
		<comments>http://www.jonsblog.org/2011/11/28/installing-mysql-on-osx-lion-server/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 20:40:19 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[OSX Lion]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=448</guid>
		<description><![CDATA[It is a fact that Apple has migrated itself away from MYSQL. It is also a fact that most people who continue to buy Apple Servers have been using MYSQL for some time and have websites or other content that sill relies on this technology. Just because it is not endorsed or pre-configured by Apple however does not mean that it can not be used. On the contrary installing and configuring MYSQL to run on an OSX Lion server is moderately easy and gives greater insight as to how MYSQL works (If your a novice to intermediate MYSQL user like me). Lets get started with a brief walkthrough of how to install MYSQL on an OSX Lion Server.]]></description>
			<content:encoded><![CDATA[<p>It is a fact that Apple has migrated itself away from MYSQL. It is also a fact that most people who continue to buy Apple Servers have been using MYSQL for some time and have websites or other content that sill relies on this technology. Just because it is not endorsed or pre-configured by Apple however does not mean that it can not be used. On the contrary installing and configuring MYSQL to run on an OSX Lion server is moderately easy and gives greater insight as to how MYSQL works (If your a novice to intermediate MYSQL user like me). Lets get started with a brief walkthrough of how to install MYSQL on an OSX Lion Server.</p>
<p><strong>Installation &#038; Configuration</strong></p>
<p>1. Download and install the 64-bit 10.6+ version of MYSQL installer package together with the startup files <a href="http://mysql.he.net/Downloads/MySQL-5.5/mysql-5.5.14-osx10.6-x86_64.dmg">here</a>.</p>
<p>http://dev.mysql.com/downloads/mysql/</p>
<p>2. Mount the Disk Image (I mean open/double-click the DMG file) and install MySQL server by double-clicking the PKG file (in my case mysql-5.5.14-osx10.6-x86_64.pkg) and follow onscreen instructions. ( It will ask for Master password, as it installs MySQL server in /usr/local )</p>
<p>Current latest version is 5.5.14 which I’ll be using to install on my server.</p>
<p>Open the DMG and you will see that the first item is the MySQL software, the 2nd item allows MySQL to start when the Mac is booted and the third is a System Preference that allows start/stop operation and a preference to enable it to start on boot. Run all of these.</p>
<p>Once the installs are done you can start the mysql server right from the System Preferences which has a new preference in the “Other” category called “MySQL” click start and now it is running. </p>
<p>To find the MySQL version from the terminal, type at the prompt</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #660033;">-v</span></pre></td></tr></table></div>

<p>If you got the error: ERROR 2002 (HY000): Can&#8217;t connect to local MySQL server through socket &#8216;/tmp/mysql.sock&#8217; </p>
<p>then mysql was not started, go back to the System Preference and start the database.</p>
<p>3. Run the following commands</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>support-files<span style="color: #000000; font-weight: bold;">/</span>my-small.cnf <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>my.cnf
open <span style="color: #660033;">-e</span> <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>my.cnf</pre></td></tr></table></div>

<p>replace &#8220;/tmp/mysql.sock&#8221; with &#8220;/var/mysql/mysql.sock&#8221; at two places near the top.<br />
Create a folder called &#8220;mysql&#8221; (if you don&#8217;t already have one) in the /var directory with the right permissions: <span id="more-448"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>var
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> mysql
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> mysql mysql 
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">775</span> mysql</pre></td></tr></table></div>

<p>This command will circumvent the dreaded mysql 2002 socket error.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mysql.sock <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>mysql.sock</pre></td></tr></table></div>

<p>4. Create your alias, this is important so that you can run MYSQL queries through the terminal.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> mysql <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #7a0874; font-weight: bold;">alias</span> mysqladmin <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysqladmin</pre></td></tr></table></div>

<p>optionally you can edit the ~/.profile file to make your aliases (This should be done as root)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">pico ~<span style="color: #000000; font-weight: bold;">/</span>.profile</pre></td></tr></table></div>

<p>then add this line below</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span></pre></td></tr></table></div>

<p>*Please note /usr/local/mysql is only symlink to /usr/local/mysql-5.5.14-osx10.6-x86_64 which means when you upgrade to new version symlink will be changed to point to new version but won’t be deleting the older version. However you need to copy your data directory to new location to make sure your existing databases are intact post upgrade.</p>
<p>5. Set the master MYSQL password, there are 2 ways to do this one is a regular way and the other provides additional security and disables all other access</p>
<p><b>Regular Way</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mysqladmin <span style="color: #660033;">-u</span> root password <span style="color: #ff0000;">'yourpasswordhere'</span></pre></td></tr></table></div>

<p>** use the single quotes. Then when login to mysql to test your password</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-pyourpasswordhere</span></pre></td></tr></table></div>

<p><b>Secure Way</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> mysql_secure_installation
&nbsp;
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE<span style="color: #000000; font-weight: bold;">!</span> PLEASE READ EACH STEP CAREFULLY<span style="color: #000000; font-weight: bold;">!</span>
In order to log into MySQL to secure it, we<span style="color: #ff0000;">'ll need the current
password for the root user. If you'</span>ve just installed MySQL, and
you haven<span style="color: #ff0000;">'t set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):</span></pre></td></tr></table></div>

<p>Go ahead and just hit enter if this is a new installation and no password currently exists, follow the prompts to set up a new root password – this is a root password just for mysql separate from the root password of OS X you should set this.</p>
<p>You also get asked about:</p>
<ul>
<li> Removing anonymous users?
<li> Disallow root login remotely?
<li> Remove test database and access to it?
<li> Reload privilege tables now?
<li> If this is a new installation you can just answer yes to  the questions.
</ul>
<p>Once the root user and password is set, you have to interact with mysql with the username and password, so access via command line is (note that there is no space between -p and the password)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root -p<span style="color: #7a0874; font-weight: bold;">&#91;</span>password<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></td></tr></table></div>

<p>Now that you have MYSQL running you need to start an instance or a main profile for MYSQL to run. I have found the easiest way to do this is to install PHPMYADMIN and since most people in my opinion (Again novice to intermediate MYSQL user here) use this great tool to navigate around MYSQL on a daily basis. Here is a brief walkthrough on how to install and configure PHPMYADMIN on 10.7 Lion Server</p>
<p><strong>Installation &#038; Configuration</strong></p>
<p>1. Change the socket location in your PHP configuration by editing the php.ini file. You need to do a search and replace here. Search and replace all instances of </p>
<p>/var/mysql/mysql.sock</p>
<p>with </p>
<p>/tmp/mysql.sock</p>
<p>Once done you should be able to run the following command and it should reflect the new updated values you just applied.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">grep</span> .default_socket <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php.ini</pre></td></tr></table></div>

<p>while editing the php.ini file you need to comment out or enable the following extensions.</p>
<p>extension=php_mysql.dll<br />
extension=php_mysqli.dll</p>
<p>To check your work again you can run this command to ensure they are enabled.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">grep</span> mysql <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php.ini<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> ext</pre></td></tr></table></div>

<p>Once done restart Apache</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> apachectl restart</pre></td></tr></table></div>

<p>2. Download PHPMYADMIN to the default web directory in Lion</p>
<p>http://www.phpmyadmin.net/home_page/index.php</p>
<p>The full path is</p>
<p>/Library/Server/Web/Data/Sites/Default</p>
<p>I put my PHPMYADMIN in a folder called PHP so</p>
<p>/Library/Server/Web/Data/Sites/Default/PHP</p>
<p>and I could then browse to it by going to</p>
<p>http://server.domain.name/PHP/</p>
<p>this is assuming that you have already configured or turned on web services which I will not go into here since it is a very basic step. I will write a more in depth article and how to on the complexities of running an 10.7 web server in the future however.</p>
<p>Run this command on the PHP Config folder</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> o+<span style="color: #c20cb9; font-weight: bold;">w</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Server<span style="color: #000000; font-weight: bold;">/</span>Web<span style="color: #000000; font-weight: bold;">/</span>Data<span style="color: #000000; font-weight: bold;">/</span>Sites<span style="color: #000000; font-weight: bold;">/</span>Default<span style="color: #000000; font-weight: bold;">/</span>PHP<span style="color: #000000; font-weight: bold;">/</span>config</pre></td></tr></table></div>

<p>3. Now we are ready to run the set up by going to</p>
<p>http://localhost/PHP/setup</p>
<p>The new server to be configured is the localhost, click new server and then the only other configurations are the local mysql user and the password.</p>
<p>Add in the username, by default “root” is assumed, add in the password, click on save and you are returned to the previous screen.</p>
<p>Make sure you click on save, then a config.inc.php is now in the /config directory, move this file to the root level of /phpmyadmin and then remove the empty /config directory.</p>
<p>Now going to http://localhost/PHP/ will now allow you to interact with your mysql databases.</p>
<p>I hope that you all found this article and walkthrough educational, as always please feel free to interact with me by posting questions and comments and I will answer them as best as I can. If you feel like any of this is wrong or could be improved upon also please leave a comment below, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/11/28/installing-mysql-on-osx-lion-server/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>A defining moment in history</title>
		<link>http://www.jonsblog.org/2011/10/08/a-defining-moment-in-history/</link>
		<comments>http://www.jonsblog.org/2011/10/08/a-defining-moment-in-history/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 01:12:46 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Letter to the Editor]]></category>
		<category><![CDATA[remember]]></category>
		<category><![CDATA[steve jobs]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=437</guid>
		<description><![CDATA[I don't really know what to say. I never met him, I never knew him. I was and am such a huge fan, I always watched the keynotes and was so inspired that all I wanted to do was to was to work with the technology that Steve inspired. I became a Certified Apple Technician, and went on to get all of Apples Server Certifications.]]></description>
			<content:encoded><![CDATA[<p>Subject: I am who I am because of you.<br />
To: rememberingsteve@apple.com</p>
<p>I don&#8217;t really know what to say. I never met him, I never knew him. I was and am such a huge fan, I always watched the keynotes and was so inspired that all I wanted to do was to was to work with the technology that Steve inspired. I became a Certified Apple Technician, and went on to get all of Apples Server Certifications. I was hired by a non profit, they use all Apple technology from the computers to servers and everything in between.</p>
<p>I love my job because I love the technology that I work with and I am truly happy with my life and its all because of Apple and so much of Apple was Steve Jobs. He made it possible for me to be happy and enjoy my life and my job. I am so passionate about this technology. The biggest goal of my life was to eventually meet Steve Jobs or even just be in the same room as him. </p>
<p>I got the go ahead to be at the last WWDC but was not able to acquire tickets. It feels like a big blow to know that I will never meet or see in person the man who has made my life what it is today. I feel a big void in my heart and I truly miss him. I guess I am writing this because I wanted someone to know how much he has touched my life even if it was touched indirectly. It has changed me and made me who I am today.</p>
<p>Thanks Steve.</p>
<p>Jon Brown<br />
IT Director<br />
Food &amp; Water Watch</p>
<p>http://www.foodandwaterwatch.org</p>
<p>Huge Apple Fan </p>
<p>http://www.jonsblog.org</p>
<p>P.S. One of my most favorite clips.<br />
<iframe src="http://www.youtube.com/embed/CW0DUg63lqU" frameborder="0" width="502" height="360"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/10/08/a-defining-moment-in-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better Quota notifications for OSX Server</title>
		<link>http://www.jonsblog.org/2011/10/07/better-quota-notifications-for-osx-server/</link>
		<comments>http://www.jonsblog.org/2011/10/07/better-quota-notifications-for-osx-server/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 23:15:49 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[bash script]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[quota]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=418</guid>
		<description><![CDATA[OSX Server comes pre-packaged with Dovecot one of the best IMAP services out there and one of the most extensible and flexible in my opinion. That is its flexible and extensible as long as you know how to configure Dovecot which most OSX Server Administrators are not. I had a conversation with a co-worker not too long ago about being an OSX Server Administrator and I joked that Apple made great hardware and a great OS but most if not all of the services under the hood for Web, Mail, Mailing Lists, etc... were all borrowed open source technologies and that Apple really does not offer any sort of support base for the open source technologies that they use. However without these pieces of software their entire PR Campaign would hold no water. What I praise Apple for is taking these tools and utilizing them and making them easier to use while leaving the ability to tinker and improve these services.]]></description>
			<content:encoded><![CDATA[<p>OSX Server comes pre-packaged with Dovecot one of the best IMAP services out there and one of the most extensible and flexible in my opinion. That is its flexible and extensible as long as you know how to configure Dovecot which most OSX Server Administrators are not. I had a conversation with a co-worker not too long ago about being an OSX Server Administrator and I joked that Apple made great hardware and a great OS but most if not all of the services under the hood for Web, Mail, Mailing Lists, etc&#8230; were all borrowed open source technologies and that Apple really does not offer any sort of support base for the open source technologies that they use. However without these pieces of software their entire PR Campaign would hold no water. What I praise Apple for is taking these tools and utilizing them and making them easier to use while leaving the ability to tinker and improve these services.</p>
<p>One such service is the topic today, Dovecot. Dovecot is integrated with Server Admin, Apples GUI Server Administration tool. You can set two different kind of notifications to trigger here, a quota notification that will send an email out when someone is over a certain percentage of email quota and an email warning them when they have gone over quota. In my experience it takes more than a couple emails to make a user clean up their inbox.</p>
<p>What I wanted was a way to say, send out an email when a user goes over a specified limit and then send an email every ten percent they go over the original limit. When they reach ten percent before their quota is exceeded increase the email notification rate to one email every percent until they reach their quota and then at that time continue to send an email a day until their quota has been reduced. On top of that I wanted it to also notify me of people who have gone over quota so that I can prove to them that they did indeed get the notification. For me a good solution was having all quota notifications CC&#8217;d to our help desk which in turn opened a ticket on the behalf of the offender in a sense sending them two emails each time they went over quota. I am going to cover the necessary steps needed to accomplish this task on your OSX Mail server.</p>
<p>** Note what we are about to do will mean that you will no longer be able to use Server Admin to manage email notifications.</p>
<h4>1. Locate the Dovecot Configuration file.</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>dovecot.conf</pre></td></tr></table></div>

<h4>2. Edit the file</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #c20cb9; font-weight: bold;">sudo</span> pico <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>dovecot.conf</pre></td></tr></table></div>

<h4>3. Find this line</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"> quota_warning = <span style="color: #007800;">storage</span>=<span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh</pre></td></tr></table></div>

<p>we are going to modify this line and add the following lines.<span id="more-418"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">  quota_warning = <span style="color: #007800;">storage</span>=<span style="color: #000000;">100</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning2 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">99</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning3 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">98</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning4 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">97</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning5 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">96</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning6 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">95</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning7 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">94</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning8 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">93</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning9 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">92</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning10 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">91</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning11 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">90</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-exceeded.sh
  quota_warning12 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">87</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-warning.sh
  quota_warning13 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">85</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-warning.sh
  quota_warning14 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-warning.sh
  quota_warning15 = <span style="color: #007800;">storage</span>=<span style="color: #000000;">75</span><span style="color: #000000; font-weight: bold;">%%</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>quota-warning.sh</pre></td></tr></table></div>

<p>What we are saying here is that we are going to send out an email every time someone is over their limit. Here the limit is 75% and every 5% they go over they will get another warning until they get to 90% then the warnings become more frequent one every 1%. Not only that but there are two different messages the quota-warning and the quota-exceeded.</p>
<h4>4. We are going to create a new quota-warning.sh file</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pico quota-warning.sh</pre></td></tr></table></div>

<p>This is the current default Apple script that triggers the default email created in Server Admin.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">_quota_txt</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mail<span style="color: #000000; font-weight: bold;">/</span>quota_warning.txt
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> <span style="color: #007800;">$_quota_txt</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$_quota_txt</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>deliver <span style="color: #660033;">-d</span> <span style="color: #007800;">$USER</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

<p>We are going to modify this script to send out an email of our choice and to do so to another recipient so we have a record of users getting notifications.Here is the script that I wrote that does just that.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">PERCENT</span>=<span style="color: #007800;">$1</span>
<span style="color: #007800;">FROM_SMTP</span>=<span style="color: #ff0000;">&quot;support@somedomain.com&quot;</span>
<span style="color: #007800;">FROM</span>=<span style="color: #ff0000;">&quot;FWW Support &lt;support@somedomain.com&gt;&quot;</span>
<span style="color: #007800;">TO</span>=<span style="color: #ff0000;">&quot;FWW Support &lt;mail-server-admini@somedomain.com&gt;&quot;</span>
<span style="color: #007800;">qwf</span>=<span style="color: #ff0000;">&quot;/tmp/quota.warning.$$&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;From: <span style="color: #007800;">$FROM</span>
To: <span style="color: #007800;">$USER</span>
Subject: Quota Notification
Content-Type: text/plain; charset=&quot;</span>UTF-<span style="color: #000000;">8</span><span style="color: #ff0000;">&quot;
&nbsp;
Hello-
This is a warning email that was automatically sent. You are nearing your quota limit. The current quota is 1 GB of storage space per user. However you can store more offline.
&nbsp;
Q: What can I do now?
&nbsp;
A: Start backing up your emails and storing them in a folder under the On My Mac heading, this will ensure that your emails will still be stored and it will free up space on your online account.
&nbsp;
If you need more assistance please contact Jon Brown at 
support@somedomain.com.
&nbsp;
Thank you for your cooperation!
&nbsp;
-- Some Organization Mail Server&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$qwf</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$qwf</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sendmail</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$FROM_SMTP</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$USER</span>&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$qwf</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;From: <span style="color: #007800;">$USER</span>
To: support@somedomain.com
Subject: Quota Notification
Content-Type: text/plain; charset=&quot;</span>UTF-<span style="color: #000000;">8</span><span style="color: #ff0000;">&quot;
&nbsp;
Hello  -
&nbsp;
<span style="color: #007800;">$USER</span> Is nearing their quota. Please follow these steps.
&nbsp;
1. Call the user and make sure they understand how to archive their email.
&nbsp;
2. Explain to the user that they can sort their email by largest size, tell them to discard or remove the largest emails first.
&nbsp;
3. Ensure that the quota has been reduced in Server Admin, do not increase the quota unless it is an emergency.
&nbsp;
-- Some Organization Mail Server&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$qwf</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$qwf</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sendmail</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$FROM_SMTP</span> <span style="color: #ff0000;">&quot;support@somedomain.com&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$qwf</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>

<p>You must replace the above script with the old script entirely. This will negate the ability to use the text file that Server Admin uses for email notifications but allows you to send the notification to multiple people.</p>
<h4>4. We are going to create a new quota-exceeded.sh file</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot
<span style="color: #c20cb9; font-weight: bold;">sudo</span> pico quota-warning.sh</pre></td></tr></table></div>

<p>This is the current default Apple script that triggers the default email created in Server Admin.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">_quota_txt</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>mail<span style="color: #000000; font-weight: bold;">/</span>quota_exceeded.txt
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> <span style="color: #007800;">$_quota_txt</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$_quota_txt</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>deliver <span style="color: #660033;">-d</span> <span style="color: #007800;">$USER</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

<p>We are going to re-write this script and use the following to do similar to the above but at a more aggressive rate.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">PERCENT</span>=<span style="color: #007800;">$1</span>
<span style="color: #007800;">FROM_SMTP</span>=<span style="color: #ff0000;">&quot;support@somedomain.com&quot;</span>
<span style="color: #007800;">FROM</span>=<span style="color: #ff0000;">&quot;FWW Support &lt;support@somedomain.com&gt;&quot;</span>
<span style="color: #007800;">TO</span>=<span style="color: #ff0000;">&quot;FWW Support &lt;mail-server-admin@somedomain.com&gt;&quot;</span>
<span style="color: #007800;">qwf</span>=<span style="color: #ff0000;">&quot;/tmp/quota.warning.$$&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;From: <span style="color: #007800;">$FROM</span>
To: <span style="color: #007800;">$USER</span>
Subject: FWW ***You're Over Your Quota***
Content-Type: text/plain; charset=&quot;</span>UTF-<span style="color: #000000;">8</span><span style="color: #ff0000;">&quot;
&nbsp;
Hello-
This is a warning email that was automatically sent. You are nearing your quota limit. The current quota is 1 GB of storage space per user. However you can store more offline.
&nbsp;
Q: What can I do now?
&nbsp;
A: Start backing up your emails and storing them in a folder under the On My Mac heading, this will ensure that your emails will still be stored and it will free up space on your online account.
&nbsp;
If you need more assistance please contact Jon Brown at support@somedomain.com.
&nbsp;
Thank you for your cooperation!
&nbsp;
-- FWW Mac Server&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$qwf</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$qwf</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sendmail</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$FROM_SMTP</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$USER</span>&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$qwf</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;From: <span style="color: #007800;">$USER</span>
To: support@somedomain.com
Subject: FWW ***You're Over Your Quota***
Content-Type: text/plain; charset=&quot;</span>UTF-<span style="color: #000000;">8</span><span style="color: #ff0000;">&quot;
&nbsp;
Hello  -
&nbsp;
<span style="color: #007800;">$USER</span> Is nearing their quota. Please follow these steps.
&nbsp;
1. Call the user and make sure they understand how to archive their email.
&nbsp;
2. Explain to the user that they can sort their email by largest size, tell them to discard or remove the largest emails first.
&nbsp;
3. Ensure that the quota has been reduced in Server Admin, do not increase the quota unless it is an emergency.
&nbsp;
4. Explain to the user that their email will stop working if they reach 99% capacity.
&nbsp;
-- FWW Mac Server&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$qwf</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$qwf</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sendmail</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$FROM_SMTP</span> <span style="color: #ff0000;">&quot;support@somedomain.com&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$qwf</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>

<p>That is it, once you are done you must restart dovecot.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> serveradmin stop mail
<span style="color: #c20cb9; font-weight: bold;">sudo</span> serveradmin start mail</pre></td></tr></table></div>

<p>Once done you will now be able to enjoy the fruits of your labor. Your users will now get a lot more notifications which will mean that they will be more likely to tame their unruly inboxes on their own and you will be notified as to when they are getting notifications so that you can better assist them with this task. As always I encourage your comments, suggestions and questions. I hope you all enjoyed my post and thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/10/07/better-quota-notifications-for-osx-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Deploy Studio Server to the Rescue</title>
		<link>http://www.jonsblog.org/2011/07/30/deploy-studio-server-to-the-rescue/</link>
		<comments>http://www.jonsblog.org/2011/07/30/deploy-studio-server-to-the-rescue/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 04:02:48 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Product Reviews]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[studio]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=385</guid>
		<description><![CDATA[As a Mac System Admin working in the Private sector, I must confess I find myself like a kid in the candy store looking, and trying out new products created by third party vendors that make my life, job and the user experience for my clients easier and more productive. I must stress that most [...]]]></description>
			<content:encoded><![CDATA[<p>As a Mac System Admin working in the Private sector, I must confess I find myself like a kid in the candy store looking, and trying out new products created by third party vendors that make my life, job and the user experience for my clients easier and more productive. I must stress that most admins can not fully share in my joy due to job or security restrictions. Admins in the Government sector for example can only use sanctioned tools and or methods for dealing with common Server Admin problems. These often lead to long, lenghtly solutions that could be eased with the use of third party software solutions. The restrictions are in place to keep security measures tight and ensure that proper procedures are followed.</p>
<p>Again, since I do not have any looming restrictions in my workplace I have found a piece of software that would never be allowed in larger Government facilities but works nicely for what I need. The problem, from time to time I need to re-image or re-core a massive amount of computers, sometimes hundreds of computers. I have a team of two, me and a Helpdesk Technician. This is a daunting task and since I do not like to work weekends, I find that Deploy Studio Server helps me keep my sanity in such situations.</p>
<p>This freeware tool can be used to create deployment files using Netboot, external USB or FireWire drives, or any AFP, SMB, or NFS sharepoint on the network. DeployStudio works with Mac OS X 10.4.11 to 10.6.8 at this point, and is updated regularly to include new OS versions. The package consists of DeployStudio Server, DeployStudio Assistant, DeployStudio Admin, and diffPackageMaker.</p>
<p>DeployStudio Server creates a network based deployment server containing the images. Assistant is used to configure the server and to create the NetInstall sets, while Admin is used to monitor deployments, manage disk images and scripts, enter configurations, and more. diffPackageMaker can look at the difference between two file system snapshots and create installation packages based on what has been changed or added. </p>
<p><center>
<div class="lyMe" id="WYL_YIV6Bt3L1ks" style="width:480px;height:360px;"><noscript><a href="http://youtu.be/YIV6Bt3L1ks"><img src="http://img.youtube.com/vi/YIV6Bt3L1ks/0.jpg" alt="" width="480" height="340" /><br />Watch this video on YouTube</a> Embedded with WP YouTube Lyte.</noscript></div>
<div class="lL" style="width:480px;"></div>
<p></center></p>
<p>I highly recommend using this fine product if you are in the fortunate position as myself and you are not under any pressure or regulations. This requires the use of an in-house server and it installs itself as a service on it. You configure the service to deploy images that you create, and the best part is that it can perform common tasks that will save you time after the re-imaging process is completed. Tasks like setting the computer name, setting up local accounts, <span id="more-385"></span> binding the computer to a directory server and much more. I describe it as Apple Netboot + Apple Automater = Deploy Studio Server. This is a useful tool that I highly recommend. Check out this instructional video that goes over how to set it up and use it.</p>
<p>I use Deploy Studio Server in my workplace and can field any questions you may have regarding its functionality, setup and configuration and ease of use. Write me a comment below and I will be happy to help!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/07/30/deploy-studio-server-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Reader, Network Accounts &amp; 10.6.8 Server</title>
		<link>http://www.jonsblog.org/2011/07/23/adobe-reader-network-accounts-10-6-8-server/</link>
		<comments>http://www.jonsblog.org/2011/07/23/adobe-reader-network-accounts-10-6-8-server/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 03:41:01 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[account]]></category>
		<category><![CDATA[acrobat]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[reader]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=380</guid>
		<description><![CDATA[There has been a lingering issue with running Network Accounts and letting the users of those network accounts use Adobe Acrobat Reader on an OSX Leopard &#038; Snow Leopard server environment for a while. The issue presents itself as a hard crash of Adobe Reader, while the user is trying to use the program. After [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lingering issue with running Network Accounts and letting the users of those network accounts use Adobe Acrobat Reader on an OSX Leopard &#038; Snow Leopard server environment for a while. The issue presents itself as a hard crash of Adobe Reader, while the user is trying to use the program. After much trial and investigation, I have narrowed down the reason for the crash to the fact that the program is trying to save temporary cache files to the users Documents folder. Since the folder is a network based folder (Network account, running mobile home folders off of the server), the program crashes as it is unable to create those files in the remote network location. </p>
<p>This is quite frustrating and for the System Admins trying to use Network Accounts, waiting for Adobe to fix this issue has been a waiting game that so far has not come to an end. The obvious solution of course that I tell my users is to use Preview instead of Adobe Acrobat Reader to read their PDF files. This does solve their problems in the short term however my users quickly point out that they need Adobe Acrobat Pro which causes the same issue. Since Preview is no substitution for Adobe Acrobat Pro, this poses a real challenge for the user and the System administrator.</p>
<p>I have been scouring the web trying to find a solution and finally I got a break. A user on an Adobe Forum post, posted a temporary fix that worked wonders for my problem. It was so great I wanted to be sure that this solution gets the exposure that it so rightly deserves. You can read the entire <a href="http://forums.adobe.com/thread/794726">post</a> here and the solution below.</p>
<blockquote><p><em><br />
&#8220;Hi I have seen this issue on Network accounts for quite a while. It also affects Adobe Acrobat Pro and we have come up with a temporary fix until something is done about the issue. The main problem as I understand it is Adobe Reader does not like writing to network locations. </p>
<p>If you are logged in as a network user then your home directory is going to be something like smb://server/home/user which Adobe does not like and causes the app to crash. To get around this issue we have created a small login hook that creates a symlink in ~/Application\ Support/Adobe which redirects the data to /Users/shared which is stored locally on the machine. </p>
<p>Here is the login hook we&#8217;re using if it helps anyone.&#8221;</em>
</p></blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>Network<span style="color: #000000; font-weight: bold;">/</span>Servers<span style="color: #000000; font-weight: bold;">/</span>yourservername<span style="color: #000000; font-weight: bold;">/</span>homes<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span><span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Application\ Support<span style="color: #000000; font-weight: bold;">/</span>Adobe
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>Shared<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #000000;">777</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>Shared<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span>
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>Shared<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span> <span style="color: #000000; font-weight: bold;">/</span>Network<span style="color: #000000; font-weight: bold;">/</span>Servers<span style="color: #000000; font-weight: bold;">/</span>yourservername<span style="color: #000000; font-weight: bold;">/</span>homes<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span><span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Application\ Support<span style="color: #000000; font-weight: bold;">/</span>Adobe
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></td></tr></table></div>

<p><span id="more-380"></span></p>
<blockquote><p><em>I throw this in /Library/Preferences and call it symlink.sh and then run the following command to setup the login hook</p>
<p>sudo defaults write com.apple.loginwindow LoginHook /Library/Preferences/symlink.sh</p>
<p>You will find the adobe Reader / Pro and other adobe apps will now work with network accounts. Not the nicest solution but a working one.</em></p></blockquote>
<p>I can verify that the solution works well. The script runs, creates the appropriate symlinks and then allows the program to continue to function. The files are created locally for the network user. The only drawback to this is that if you have temporary accounts using computers you will need to clean-up these files from time to time. If the users move about from workstation to workstation then the files will be re-created for that user on multiple machines. These are minor inconveniences that are less noticeable for the user and enable them to get their work done while using Network based accounts in OSX. Let us know what your experiences have been, and if this solution works for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/07/23/adobe-reader-network-accounts-10-6-8-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

