<p>This will take some more extensive testing to ensure stability and functionality. I am fully available to help with the testing.</p>

<p><strong>Setup:</strong><br>
1. Flash 2 nodes with the pull request dependencies, and at least one node with the regular nightly build.<br>
2. record the memory usage of commotion-service-manager (CSM) upon boot.<br>
3. Set the default app lifetime on the nodes to 1 hour (in the apps portal settings page).<br>
4. Add 5-10 unique applications on each node (including the node(s) without CSM), meanwhile monitoring for any crashes of CSM or unusually high memory usage.</p>

<p><strong>Expected results:</strong><br>
1. CSM should not crash<br>
2. CSM should not use abnormally large amounts of memory or lead to node crashes.<br>
3. Apps added to a node with CSM should appear almost instantly on the other node with CSM.<br>
4. Apps on nodes with CSM should <strong>not</strong> show up on nodes without CSM, and vice versa.<br>
5. Apps should properly expire after one hour, both on the node they were added on, as well as nodes that picked up their announcements.<br>
6. Expired apps should no longer appear in <code>/etc/config/applications</code>, and their Avahi service file should have been removed from <code>/etc/avahi/services</code>.<br>
7. Running <code>kill -s USR1 $(pgrep commotion-service-manager)</code> should result in a <code>;</code>-delimited dump of service announcements in the file <code>/tmp/local-services.out</code>.</p>

<p>If you run into problems right from the beginning, be sure that <code>servald</code> is running on each node and that <code>servald id self</code> returns a valid SID. If not, restart <code>servald</code>.</p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/opentechinstitute/commotion-feed commotion-service-manager</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/opentechinstitute/commotion-feed/pull/34'>https://github.com/opentechinstitute/commotion-feed/pull/34</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>added commotion-service-manager</li>
  <li>fix to luci-commotion-apps openwrt makefile</li>
  <li>fix to luci-commotion-apps openwrt makefile</li>
  <li>removed avahi-client</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>D</strong>
    <a href="https://github.com/opentechinstitute/commotion-feed/pull/34/files#diff-0">packages/avahi-client/Makefile</a>
    (48)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-feed/pull/34/files#diff-1">packages/commotion-service-manager/Makefile</a>
    (48)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/opentechinstitute/commotion-feed/pull/34/files#diff-2">packages/commotion-service-manager/etc/init.d/commotion-service-manager</a>
    (15)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/opentechinstitute/commotion-feed/pull/34/files#diff-3">packages/luci-commotion-apps/Makefile</a>
    (16)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/opentechinstitute/commotion-feed/pull/34.patch'>https://github.com/opentechinstitute/commotion-feed/pull/34.patch</a></li>
  <li><a href='https://github.com/opentechinstitute/commotion-feed/pull/34.diff'>https://github.com/opentechinstitute/commotion-feed/pull/34.diff</a></li>
</ul>