summaryrefslogtreecommitdiff
path: root/media-sound/subsonic/files
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/subsonic/files')
-rw-r--r--media-sound/subsonic/files/no-installers.patch22
-rw-r--r--media-sound/subsonic/files/no-license.patch44
-rw-r--r--media-sound/subsonic/files/subsonic.confd23
-rw-r--r--media-sound/subsonic/files/subsonic.initd33
4 files changed, 122 insertions, 0 deletions
diff --git a/media-sound/subsonic/files/no-installers.patch b/media-sound/subsonic/files/no-installers.patch
new file mode 100644
index 0000000..23deda2
--- /dev/null
+++ b/media-sound/subsonic/files/no-installers.patch
@@ -0,0 +1,22 @@
+Index: pom.xml
+===================================================================
+--- pom.xml (revision 3501)
++++ pom.xml (working copy)
+@@ -82,10 +82,6 @@
+ <id>full</id>
+ <modules>
+ <module>subsonic-booter</module>
+- <module>subsonic-installer-windows</module>
+- <module>subsonic-installer-mac</module>
+- <module>subsonic-installer-debian</module>
+- <module>subsonic-installer-rpm</module>
+ <module>subsonic-backend</module>
+ <module>subsonic-site</module>
+ <module>subsonic-assembly</module>
+@@ -159,4 +155,4 @@
+
+ </plugins>
+ </build>
+-</project>
+\ No newline at end of file
++</project>
diff --git a/media-sound/subsonic/files/no-license.patch b/media-sound/subsonic/files/no-license.patch
new file mode 100644
index 0000000..a198a2a
--- /dev/null
+++ b/media-sound/subsonic/files/no-license.patch
@@ -0,0 +1,44 @@
+Index: subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java
+===================================================================
+--- subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java (revision 3501)
++++ subsonic-main/src/main/java/net/sourceforge/subsonic/service/SettingsService.java (working copy)
+@@ -648,7 +648,7 @@
+ if (email == null || license == null) {
+ return false;
+ }
+- return license.equalsIgnoreCase(StringUtil.md5Hex(email.toLowerCase()));
++ return true;
+ }
+
+ public LicenseInfo getLicenseInfo() {
+@@ -1250,29 +1250,7 @@
+ }
+
+ licenseValidated = true;
+-
+- HttpClient client = new DefaultHttpClient();
+- HttpConnectionParams.setConnectionTimeout(client.getParams(), 120000);
+- HttpConnectionParams.setSoTimeout(client.getParams(), 120000);
+- HttpGet method = new HttpGet("http://subsonic.org/backend/validateLicense.view" + "?email=" + StringUtil.urlEncode(email) +
+- "&date=" + date.getTime() + "&version=" + versionService.getLocalVersion());
+- try {
+- ResponseHandler<String> responseHandler = new BasicResponseHandler();
+- String content = client.execute(method, responseHandler);
+- licenseValidated = content != null && content.contains("true");
+- if (!licenseValidated) {
+- LOG.warn("License key is not valid.");
+- }
+- String[] lines = StringUtils.split(content);
+- if (lines.length > 1) {
+- licenseExpires = new Date(Long.parseLong(lines[1]));
+- }
+-
+- } catch (Throwable x) {
+- LOG.warn("Failed to validate license.", x);
+- } finally {
+- client.getConnectionManager().shutdown();
+- }
++ return;
+ }
+
+ public synchronized void scheduleLicenseValidation() {
diff --git a/media-sound/subsonic/files/subsonic.confd b/media-sound/subsonic/files/subsonic.confd
new file mode 100644
index 0000000..abb5f6d
--- /dev/null
+++ b/media-sound/subsonic/files/subsonic.confd
@@ -0,0 +1,23 @@
+SUBSONIC_HOST=0.0.0.0
+SUBSONIC_PORT=4040
+SUBSONIC_HTTPS_PORT=0
+SUBSONIC_CONTEXT_PATH=/
+SUBSONIC_MAX_MEMORY=100
+SUBSONIC_DEFAULT_MUSIC_FOLDER=/var/music
+SUBSONIC_DEFAULT_PODCAST_FOLDER=/var/music/Podcast
+SUBSONIC_DEFAULT_PLAYLIST_FOLDER=/var/playlists
+
+NICELEVEL=0
+
+# Defaults - Don't change these
+
+SUBSONIC_HOME=/var/subsonic
+
+# The user under which the server runs
+SUBSONIC_USER=subsonic
+
+# Make sure that the PID file folder is writeable for the subsonic user
+PIDFILE=${SUBSONIC_HOME}/subsonic.pid
+
+# Further subsonic start script options, if ever needed
+SUBSONIC_OPTS=""
diff --git a/media-sound/subsonic/files/subsonic.initd b/media-sound/subsonic/files/subsonic.initd
new file mode 100644
index 0000000..e163411
--- /dev/null
+++ b/media-sound/subsonic/files/subsonic.initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need net
+}
+
+start() {
+ start-stop-daemon \
+ --start --user "${SUBSONIC_USER}" --name subsonic \
+ --env HOME="${SUBSONIC_HOME}" --exec /opt/subsonic/subsonic.sh \
+ --nicelevel "${NICELEVEL}" \
+ -- --pidfile=${PIDFILE} \
+ --home=${SUBSONIC_HOME} \
+ --host=${SUBSONIC_HOST} \
+ --port=${SUBSONIC_PORT} \
+ --https-port=${SUBSONIC_HTTPS_PORT} \
+ --context-path=${SUBSONIC_CONTEXT_PATH} \
+ --max-memory=${SUBSONIC_MAX_MEMORY} \
+ --default-music-folder=${SUBSONIC_DEFAULT_MUSIC_FOLDER} \
+ --default-podcast-folder=${SUBSONIC_DEFAULT_PODCAST_FOLDER} \
+ --default-playlist-folder=${SUBSONIC_DEFAULT_PLAYLIST_FOLDER} \
+ ${SUBSONIC_OPTS}
+ eend $?
+}
+
+stop() {
+ start-stop-daemon --stop --user "${SUBSONIC_USER}" \
+ --pidfile ${PIDFILE} \
+ --wait 30000 \
+ --progress
+ eend $?
+} \ No newline at end of file