blob: cabd3604ac0f6b6bcdce6dbb00b88a9e14e193d8 (
plain)
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
|
#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License, v2 or later
SUBSONIC_HOME=${SUBSONIC_HOME:-/var/lib/${SVCNAME}}
SUBSONIC_USER=${SUBSONIC_USER:-${SVCNAME}}
PIDFILE=/run/subsonic/subsonic.pid
depend() {
after net
}
start() {
checkpath -dq -o subsonic:subsonic -m 755 /run/subsonic/
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
--start --user "${SUBSONIC_USER}" --name subsonic \
--env HOME="${SUBSONIC_HOME}" --exec /usr/bin/subsonic \
--pidfile="${PIDFILE}" \
--nicelevel "${NICELEVEL}" \
-- \
--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}" \
--pidfile="${PIDFILE}" --quiet \
${SUBSONIC_OPTS}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --user "${SUBSONIC_USER}" \
--pidfile "${PIDFILE}" \
--wait 15000 \
--progress
eend $?
}
|