From 918db6301711e2ef9bb2d085b682ec552b1abf8b Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 1 Oct 2013 14:14:31 +0000 Subject: subsonic ebuild --- media-sound/subsonic/files/subsonic.initd | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 media-sound/subsonic/files/subsonic.initd (limited to 'media-sound/subsonic/files/subsonic.initd') 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 -- cgit v1.2.3