I installed the SlimServer 6.2.1 RPM and got it to work on SuSE Linux
9.1. There were a couple of hiccups, though, and here is what I did to
fix them. Hope this info is of use to other SuSE users.
First, SuSE's init rc scripts to start services live in /etc/init.d
rather than /etc/rc.d/init.d, but the RPM installs the startup script
as /etc/rc.d/init.d/slimserver which won't work on SuSE. Also, the
content in that file is specific for Redhat and I had to modify it for
SuSE. The modified file, installed as /etc/init.d/slimserver is
included below. After putting that file in place, the command
"chkconfig slimserver on" has to be run (as root) to get the system to
start slimserver automatically on each boot. Also, the command
"/etc/init.d/slimserver start" need to be run once initially to start
slimserver without having to reboot the system.
The second problem is that before the first run of slimserver, the
provided /etc/slimserver.conf file is empty. This makes slimserver
start with all its built-in defaults. One of the parameters,
"cachedir", is set to "~". Apparently the assumption is that ~ would
evaluate to the "slimserver" account's home directory
(/usr/local/slimserver) because the server is run as that user.
However in reality it was being evaluated to be root's home directory
by bash. Slimserver tries to create its cache files under root's home
directory and fails.
The fix is to edit the /etc/slimserver.conf after the first failure,
and change the cachedir parameter to /usr/local/slimserver/Cache.
Then, create that directory and set its owner/group to "slimserver".
It will then work fine.
Here is the modified /etc/init.d/slimserver for SuSE Linux (should work
for any version of SuSE since 8.0, maybe even earlier versions too):
Code:
--------------------
---------X snip X-----------
#!/bin/sh
#
# slimserver.init This shell script takes care of starting and stopping
# the Slim streaming MP3 server.
#
# This version is modified for SuSE Linux by Ti Kan
# @(#)slimserver 1.5 06/03/13
### BEGIN INIT INFO
# Provides: slimserver
# Required-Start: $network $syslog $remote_fs
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start SlimServer Daemon
### END INIT INFO
. /etc/rc.status
rc_reset
if [ -f /etc/sysconfig/slimserver ]
then
. /etc/sysconfig/slimserver
fi
SLIMSERVER_BIN="$SLIMSERVER_HOME/slimserver.pl"
[ -x $SLIMSERVER_BIN -a -f $SLIMSERVER_CFG ] || exit 5
check() {
echo `ps -e 2>/dev/null | grep slimserver.pl | \
grep -v grep | awk '{ print $1 }'`
return $?
}
start() {
echo -n "Starting SlimServer"
su $SLIMSERVER_USER -c "$SLIMSERVER_BIN $SLIMSERVER_ARGS" && \
touch /var/lock/subsys/slimserver
return $?
}
stop() {
echo -n "Shutting down SlimServer"
pid=`check`
if [ -n "$pid" ]
then
kill -TERM $pid
fi
rm -f /var/lock/subsys/slimserver
return $?
}
# See how we were called.
case "$1" in
start)
start
rc_status -v
;;
stop)
stop
rc_status -v
;;
try-restart|force-reload)
$0 stop
$0 start
rc_status
;;
restart|reload)
echo "Reload service SlimServer..."
$0 stop && $0 start
rc_status
;;
status)
pid=`check`
if [ -n "$pid" ]
then
echo "OK"
else
echo "No process"
exit 3
fi
;;
probe)
# Do nothing
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|relo
ad|probe}"
exit 1
esac
rc_exit
--------------------
--
amb
------------------------------------------------------------------------
amb's Profile: http://forums.slimdevices.com/member.php?userid=4575
View this thread: http://forums.slimdevices.com/showthread.php?t=22156
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix