[Slim-Checkins] r33789 - in /7.7/trunk/platforms/readynas/addon_template: SQUEEZEBOX.html SQUEEZEBOX.js install.sh

[email protected]
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: mherger
Date: Tue Jan 31 07:20:09 2012
New Revision: 33789

URL: http://svn.slimdevices.com/slim?rev=33789&view=rev
Log:
Bug: n/a
Description: readynas/arm
- add basic web UI integration
- add some migration code to get rid of legacy/pre-installed files

Modified:
    7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html
    7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js
    7.7/trunk/platforms/readynas/addon_template/install.sh

Modified: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html?rev=33789&r1=33788&r2=33789&view=diff
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html (original)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html Tue Jan 31 07:20:09 2012
@@ -1,11 +1,2 @@
 <!-- User defined content -->
-<table border="0" cellpadding="2" cellspacing="0" width=400>
-  <tr>
-    <td>
-      <span id="PROMPT_SQUEEZEBOX_RUNTIME_SECS" class="field"></span>
-    </td>
-    <td>
-      <input id="SQUEEZEBOX_RUNTIME_SECS" onchange="SQUEEZEBOX_page_change();" onfocus="SQUEEZEBOX_enable_save_button();" type="text">
-    </td>
-  </tr>
-</table>
+<p><a href="" id="sbwebui" target="_blank">Free the Music!</a></p>

Modified: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js?rev=33789&r1=33788&r2=33789&view=diff
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js (original)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js Tue Jan 31 07:20:09 2012
@@ -4,6 +4,9 @@
 
 self.SQUEEZEBOX_onloadaction = function()
 {
+	// set a link to the Logitech Media Server web UI
+	// TODO: read the port from the server's configuration
+	$('#sbwebui').attr('href', 'http://' + window.location.hostname + ':9000')
 }
 
 self.SQUEEZEBOX_enable = function()

Modified: 7.7/trunk/platforms/readynas/addon_template/install.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/install.sh?rev=33789&r1=33788&r2=33789&view=diff
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/install.sh (original)
+++ 7.7/trunk/platforms/readynas/addon_template/install.sh Tue Jan 31 07:20:09 2012
@@ -53,13 +53,31 @@
 
 ###########  Addon specific action go here ###########
 
-
-# Set run-time secs to 60 secs.  We'll save this in /etc/default/services.
-grep -v SQUEEZEBOX_RUNTIME_SECS /etc/default/services > /tmp/services
-echo "SQUEEZEBOX_RUNTIME_SECS=60" >> /tmp/services
+# enable LMS by default
+grep -v SQUEEZEBOX /etc/default/services > /tmp/services
+echo "SQUEEZEBOX=1" >> /tmp/services
 cp /tmp/services /etc/default/services
 rm -f /tmp/services
 
+# Some ReadyNAS firmware builds mess up the Samba configuration if there are folders in /c/ - let's hide ours
+# http://bugs.slimdevices.com/show_bug.cgi?id=17819
+if [ ! -e /c/.squeezeboxserver/prefs/server.prefs ]; then
+  cp -rf /c/squeezeboxserver/* /c/.squeezeboxserver/ > /dev/null 2>&1
+fi
+
+# we can't leave our files on the root partition, it's too small
+if [ ! -e /c/.squeezeboxserver/prefs/server.prefs ]; then
+  cp -rf /var/lib/squeezeboxserver/* /c/.squeezeboxserver/ > /dev/null 2>&1
+  cp -rf /var/log/squeezeboxserver/* /c/.squeezeboxserver/log/ > /dev/null 2>&1
+fi
+
+rm -rf /var/lib/squeezeboxserver
+rm -rf /var/log/squeezeboxserver
+rm -rf /c/squeezeboxserver
+
+# Symlink the new log file to the old location, so the log .zip file picks it up
+rm -f /var/log/slimserver.log
+ln -sf /c/.squeezeboxserver/log/server.log /var/log/slimserver.log 
 
 ######################################################
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.