Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 68487 Details for
Bug 73832
media-sound/slimserver-6.1.1 (new package)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
files/slimserver.initd
slimserver.initd (text/plain), 6.91 KB, created by
Paul Marks
on 2005-09-14 21:49:35 UTC
(
hide
)
Description:
files/slimserver.initd
Filename:
MIME Type:
Creator:
Paul Marks
Created:
2005-09-14 21:49:35 UTC
Size:
6.91 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2004 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >opts="${opts} listformats" > >depend() { > use net >} > >checkconfig() { > SLIM_OPTIONS="${SLIM_OPTIONS:-}" > SLIM_USER="${SLIM_USER:-slimserver}" > SLIM_GROUP="${SLIM_GROUP:-slimserver}" > SLIM_MUSIC_DIR="${SLIM_MUSIC_DIR:-<<SLIM_MUSIC_DIR>>}" > SLIM_PLAYLISTS_DIR="${SLIM_PLAYLISTS_DIR:-<<SLIM_PLAYLISTS_DIR>>}" > SLIM_ITUNES_DIR="${SLIM_ITUNES_DIR:-<<SLIM_ITUNES_DIR>>}" > SLIM_ART_DIR="${SLIM_ART_DIR:-<<SLIM_ART_DIR>>}" > > FORMATSDB=$(cat /etc/slimserver/formats.conf | grep -v '^[[:space:]]*\(#.*\)\?$' | sed -e 's#[[:space:]]*:[[:space:]]*#:#g') > > [ -f /var/cache/slimserver/slimserver.conf ] || die "/var/cache/slimserver/slimserver.conf not found!" > [ -f /etc/slimserver/formats.conf ] || die "/etc/slimserver/formats.conf not found!" > [ -f /etc/slimserver/convert.conf ] || die "/etc/slimserver/convert.conf not found!" >} > >function formats_update() { >cat > /opt/slimserver/convert.conf.new << EOF ># Copyright 1999-2004 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># \$Header \$ ># ># DO NOT MODIFY THIS FILE -- IT HAS BEEN AUTO-GENERATED ># > >EOF > > for IN in ${SLIM_INPUT_FORMATS} > do > IN_LINE=$(echo "${FORMATSDB}" | grep -m 1 "^${IN}:") > > if [ -z "${IN_LINE}" ] > then > eerror "ERROR: Format '${IN}' not defined in formats file" > return 1 > else > IN_NAME=$(echo "${IN_LINE}" | cut -d : -f 2) > IN_DEC=$(echo "${IN_LINE}" | cut -d : -f 3) > IN_ENC=$(echo "${IN_LINE}" | cut -d : -f 4) > IN_TRANS=$(echo "${IN_LINE}" | cut -d : -f 5) > > echo "###" >> /opt/slimserver/convert.conf.new > echo "### Conversions for ${IN_NAME}" >> /opt/slimserver/convert.conf.new > echo "###" >> /opt/slimserver/convert.conf.new > for OUT in ${SLIM_OUTPUT_FORMATS} > do > OUT_LINE=$(echo "${FORMATSDB}" | grep -m 1 "^${OUT}:") > if [ -z "${OUT_LINE}" ] > then > eerror "ERROR: Format '${OUT}' not defined in formats file" > return 1 > else > OUT_NAME=$(echo "${OUT_LINE}" | cut -d : -f 2) > OUT_DEC=$(echo "${OUT_LINE}" | cut -d : -f 3) > OUT_ENC=$(echo "${OUT_LINE}" | cut -d : -f 4) > OUT_TRANS=$(echo "${OUT_LINE}" | cut -d : -f 5) > > if [ "${IN}" = "${OUT}" ] > then > # Either passthru or transcoding > echo -e "${IN} ${OUT} * *" >> /opt/slimserver/convert.conf.new > echo -e "\t-" >> /opt/slimserver/convert.conf.new > > if [ -n "${IN_TRANS}" -a "${IN_TRANS}" != "\$NONE\$" ] > then > echo -e "${IN} ${OUT} transcode *" >> /opt/slimserver/convert.conf.new > echo -e "\t${IN_TRANS}" >> /opt/slimserver/convert.conf.new > fi > elif [ -n "${IN_DEC}" -a -n "${OUT_ENC}" -a "${IN_DEC}" != "\$NONE\$" ] > then > # Some other, more standard pipeline > [ "${OUT_ENC}" = "\$NONE\$" ] && OUT_ENC="" || OUT_ENC="| ${OUT_ENC}" > > echo -e "${IN} ${OUT} * *" >> /opt/slimserver/convert.conf.new > echo -e "\t${IN_DEC} ${OUT_ENC}" >> /opt/slimserver/convert.conf.new > else > [ -z "${IN_DEC}" ] && eerror "ERROR: Input decoder for format '${IN}' not defined" && return 1 > [ -z "${OUT_ENC}" ] && eerror "ERROR: Output encoder for format '${OUT}' not defined" && return 1 > fi > fi > done > echo "" >> /opt/slimserver/convert.conf.new > fi > done > > cat /etc/slimserver/convert.conf >> /opt/slimserver/convert.conf.new > mv -f /opt/slimserver/convert.conf.new /opt/slimserver/convert.conf > return $? >} > >start() { > checkconfig || die "Configuration errors were found!" > > # > # Update the formats config file if we need to > # > if [ /etc/slimserver/formats.conf -nt /opt/slimserver/convert.conf ] || [ /etc/slimserver/convert.conf -nt /opt/slimserver/convert.conf -o ! -f /opt/slimserver/convert.conf ] > then > ebegin "Updating format conversion tables" > formats_update || rm -f /opt/slimserver/convert.conf.new > eend $? > fi > > ebegin "Starting SlimServer" > > # > # Force settings for MUSIC, PLAYLIST, ITUNES, and ART dirs to be whatever we got from > # /etc/conf.d/slimserver > # > SLIM_ITUNES_ENABLE=0 > [ -d "${SLIM_ITUNES_DIR}" -a -f "${SLIM_ITUNES_XML}" ] && SLIM_ITUNES_ENABLE=1 > sed \ > -e "s#^audiodir[[:space:]]*=.*\$#audiodir = ${SLIM_MUSIC_DIR}#g" \ > -e "s#^playlistdir[[:space:]]*=.*\$#playlistdir = ${SLIM_PLAYLISTS_DIR}#g" \ > -e "s#^artfolder[[:space:]]*=.*\$#artfolder = ${SLIM_ART_DIR}#g" \ > -e "s#^itunes[[:space:]]*=.*\$#itunes = ${SLIM_ITUNES_ENABLE}#g" \ > -e "s#^itunes_library_music_path[[:space:]]*=.*\$#itunes_library_music_path = ${SLIM_ITUNES_DIR}#g" \ > -e "s#^itunes_library_xml_path[[:space:]]*=.*\$#itunes_library_xml_path = ${SLIM_ITUNES_XML}#g" \ > /var/cache/slimserver/slimserver.conf > \ > /var/cache/slimserver/slimserver.conf.new && \ > mv -f /var/cache/slimserver/slimserver.conf.new /var/cache/slimserver/slimserver.conf > > # > # Make sure the permissions are correct on critical hard-coded file paths > # > chown -R ${SLIM_USER}:${SLIM_GROUP} \ > /var/log/slimserver \ > /var/run/slimserver \ > /var/cache/slimserver > > # > # Build the slimserver command line from the settings in our conf.d file > # > [ -n "${SLIM_HTTP_PORT}" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --httpport=${SLIM_HTTP_PORT}" > [ -n "${SLIM_HTTP_ADDR}" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --httpaddr=${SLIM_HTTP_ADDR}" > [ -n "${SLIM_CLI_PORT}" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --cliport=${SLIM_CLI_PORT}" > [ -n "${SLIM_CLI_ADDR}" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --cliaddr=${SLIM_CLI_ADDR}" > [ -n "${SLIM_PLAYER_ADDR}" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --playeraddr=${SLIM_PLAYER_ADDR}" > [ -n "${SLIM_STREAM_ADDR}" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --streamaddr=${SLIM_STREAM_ADDR}" > [ "${SLIM_DISABLE_SERVER_SETUP}" = "yes" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --noserver" > [ "${SLIM_DISABLE_SETUP}" = "yes" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --nosetup" > [ "${SLIM_DEBUG}" = "yes" ] && SLIM_OPTIONS="${SLIM_OPTIONS} --diag" > [ "${SLIM_QUIET}" = "no" ] || SLIM_OPTIONS="${SLIM_OPTIONS} --quiet" > > # > # Make sure SLIM_PRIORITY is valid before trying to use it > # > [ -n "${SLIM_PRIORITY}" ] && \ > if [ ${SLIM_PRIORITY} -ge -20 -a ${SLIM_PRIORITY} -le 20 ] ; then > SLIM_PRIORITY="--nicelevel ${SLIM_PRIORITY}" > else > ewarn "Invalid priority: ${SLIM_PRIORITY}" > SLIM_PRIORITY="" > fi > > # > # Oh, yeah... we actually need to start the daemon eventually... > # > start-stop-daemon --start --quiet --chuid ${SLIM_USER}:${SLIM_GROUP} ${SLIM_PRIORITY} --exec /opt/slimserver/slimserver.pl -- \ > --daemon \ > --prefsfile=/var/cache/slimserver/slimserver.conf \ > --logfile=/var/log/slimserver/slimserver.log \ > --cachedir=/var/cache/slimserver \ > --pidfile=/var/run/slimserver/slimserver.pid \ > ${SLIM_OPTIONS} > eend $? >} > >stop() { > checkconfig || die "/var/cache/slimserver/slimserver.conf not found!" > > ebegin "Stopping SlimServer" > start-stop-daemon --stop --quiet --pidfile /var/run/slimserver/slimserver.pid > eend $? >} > >listformats() { > einfo "The following formats are recognized by the SlimServer:" > echo "" > echo "${FORMATSDB}" | sed -e 's#\([^:]*\):\([^:]*\):.*#\t\1 - \2#g' > echo "" >} > ># vim: ts=4 :
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 73832
:
45556
|
45557
|
45558
|
45559
|
45560
|
45561
|
45563
|
45564
|
45565
|
45615
|
45616
|
45617
|
46428
|
46429
|
47062
|
51744
|
54408
|
65839
|
65841
|
65842
|
66443
|
66447
|
66448
|
66555
|
66955
|
67023
|
67024
|
67025
|
67026
|
67027
|
67028
|
67029
|
68486
|
68487
|
68488
|
68489
|
68490
|
69183
|
69184
|
69185
|
71769
|
71770
|
71771
|
71826
|
71827
|
71828
|
71829
|
73156
|
73157
|
73158
|
77289
|
77300
|
87174
|
87175
|
87176
|
87177
|
87178
|
90462
|
101321
|
101322
|
101323
|
101324
|
101325