Hi Thom and all other people,
thanks for your comment. This evening thanks to this great wiki page on internet:
http://wiki.debian.org/SlimServerHowtoI created a little bit better init script. This one is also able to start, stop and restart all the services related to the new squeezecenter release. I think could be possible to reuse it also for the next close future releases I mean.
I'll attach the new script and following the modification that were necessary for the porpouse:
-----------------------------------------------------------------
more /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# /etc/init.d/squeezecenter
exit 0
-----------------------------------------------------------------
more /usr/pluto/bin/LaunchSlimServer.sh
#!/bin/bash
PORT="${1:-7890}"
PARAMS="--cliport $PORT --audiodir /home/public/data/audio"
sed -ri "s,SLIMOPTIONS=.*,SLIMOPTIONS=\"$PARAMS\",g" /etc/default/slimserver
####### invoke-rc.d slimserver restart
invoke-rc.d squeezecenter restart
####### invoke-rc.d rc.local start
-----------------------------------------------------------------
I've tested it both doing a complete shutdown and a complete reboot of the core/MD system. At the moment all the services seems to be working well.
If someone else would like to test it, would be great. And also if someone would like to send me some suggestion for correction or modification, I'm here.
Best regards,
Luke
P.S. : here the squeezecenter script ----------- >
-----------------------------------------------------------------------------------------------------
#!/bin/sh
# slimserver init script for Debian Linux
#
# This script expects slimserver to be installed in
# /home/squeezecenter
#
DAEMON=/home/squeezecenter/slimserver.pl
PIDFILE=/var/cache/slimserver/squeezecenter.pid
MYSQLPIDFILE=/home/squeezecenter/squeezecenter-mysql.pid
LOGFILE=/var/log/slimserver/squeezecenter.log
CACHEDIR=/var/cache/slimserver
PORT="${1:-7890}"
DIRECTORY="squeezecenter"
USER=slimserver
UIDUSER="116"
PREFSDIR=/etc/slimserver
PREFSFILE="${PREFSDIR}/slimserver.pref"
AUDIODIR=/home/public/data/audio
CLIADDR="127.0.0.1"
mDNS=/home/squeezecenter/Bin/i386-linux/mDNSResponderPosix
SLIMSERVER_OPTS=""
test -x ${DAEMON} || exit 0
case "$1" in
start) echo -n "Starting SqueezeCenter: "
HOME=/home/$DIRECTORY
start-stop-daemon --start --quiet --exec $DAEMON -- --daemon \
--cachedir=${CACHEDIR} --audiodir=${AUDIODIR} --prefsdir=${PREFSDIR} --user=${USER} \
--cliport={$PORT} --cliaddr={$CLIADDR} --prefsfile=${PREFSFILE} --pidfile=${PIDFILE} \
--logfile=${LOGFILE} --cachedir={CACHEDIR} --noupnp ${SLIMSERVER_OPTS}
echo "Done"
;;
stop) echo -n "Stopping SqueezeCenter: "
start-stop-daemon --stop --quiet --user ${UIDUSER} --pidfile ${PIDFILE} --retry 5
start-stop-daemon --stop --quiet --user ${UIDUSER} --pidfile ${MYSQLPIDFILE} --retry 5
start-stop-daemon --stop --quiet --user ${UIDUSER} --exec ${mDNS} --retry 5
rm $PIDFILE
echo "Done"
;;
force-reload|restart) $0 stop
$0 start
;;
*) echo "Usage: $0 {start|stop|restart|force-reload}"
exit 1;
;;
esac
exit 0