3 # $FreeBSD: head/www/subsonic-standalone/files/subsonic.in 381942 2015-03-22 18:04:48Z jlh $
9 # Configuration settings for subsonic in /etc/rc.conf:
11 # subsonic_enable (bool):
12 # Set to "NO" by default.
13 # Set it to "YES" to enable subsonic
15 # subsonic_home (str):
16 # Set to "%%SUBSONIC_HOME%%" by default.
18 # subsonic_music_folder (str):
19 # Set to "%%SUBSONIC_HOME%%"/music by default.
21 # subsonic_playlist_folder (str):
22 # Set to "%%SUBSONIC_HOME%%"/playlist by default.
24 # subsonic_pidfile (str):
25 # Set to "${subsonic_home}/subsonic.pid" by default.
27 # subsonic_host (str):
28 # Set to "0.0.0.0" by default.
29 # Specify which IP address to listen to.
31 # subsonic_http_port (int):
32 # Set to "4040" by default.
33 # Specify which port to listen on for HTTP.
35 # subsonic_https_port (int):
36 # Set to "0" by default.
37 # Specify which port to listen on for HTTPS.
39 # subsonic_context_path (str):
40 # Set to "/" by default.
41 # Specify the last part of the Subsonic URL, typically "/" or "/subsonic".
43 # subsonic_max_memory (int):
44 # Set to "100" by defaut.
45 # Specify the memory limit (Java heap size) in megabytes.
52 # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
53 # so get the name of the script from $_file
65 load_rc_config "${name}"
67 eval "${rcvar}=\${${rcvar}:-'NO'}"
68 eval "${name}_user=\${${name}_user:-'subsonic'}"
69 eval "${name}_group=\${${name}_group:-'subsonic'}"
70 eval "_subsonic_max_memory=\${${name}_max_memory:-'100'}"
71 eval "_subsonic_home=\${${name}_home:-'%%SUBSONIC_HOME%%'}"
72 eval "_subsonic_music_folder=\${${name}_music_folder:-'%%SUBSONIC_HOME%%/music'}"
73 eval "_subsonic_playlist_folder=\${${name}folder:-'%%SUBSONIC_HOME%%/playlist'}"
74 eval "_subsonic_host=\${${name}_host:-'0.0.0.0'}"
75 eval "_subsonic_http_port=\${${name}_http_port:-'4040'}"
76 eval "_subsonic_https_port=\${${name}_https_port:-'0'}"
77 eval "_subsonic_context_path=\${${name}_context_path:-'/'}"
78 eval "_subsonic_pidfile=\${${name}_pidfile:-'%%SUBSONIC_HOME%%/subsonic.pid'}"
79 pidfile="${_subsonic_pidfile}"
83 command="%%SUBSONIC_DIR%%/subsonic.sh"
84 command_args="--home=${_subsonic_home} \
85 --host=${_subsonic_host} \
86 --port=${_subsonic_http_port} \
87 --https-port=${_subsonic_https_port} \
88 --context-path=${_subsonic_context_path} \
89 --max-memory=${_subsonic_max_memory} \
90 --pidfile=${_subsonic_pidfile} \
91 --default-music-folder=${_subsonic_music_folder} \
92 --default-playlist-folder=${_subsonic_playlist_folder}"