As requested. Any comments or feedback appreciated. # The packages I had installed at the time (Linux From Scratch 6.6) ---------------------- Installed packages: man-pages 3.23 GNU C Library 2.11.1 zlib 1.2.3 Binutils 2.20 gmp-5.0.0 mpfr-2.4.2 file 5.04 gcc 4.4.3 sed 4.2.1 pkg-config 0.23 ncurses 5.7.20081102 util-linux-ng 2.17 e2fsprogs 1.41.10 coreutils 8.4 iana-etc 2.30 m4 1.4.13 bison 2.4.1 procps 3.2.8 grep 2.5.4 readline 6.1 bash 4.1.0(1)-release libtool 2.2.6b gdbm 1.8.3 inetutils 1.7 perl 5.10.1 autoconf 2.65 automake 1.11.1 bzip2 1.0.5 diffutils 2.8.1 GNU Awk 3.1.7 findutils 4.4.2 flex 2.5.35 gettext 0.17 groff 1.20.1 gzip 1.4 iproute2 ss091226 kbd 1.15.1 less 436 make 3.81 man 2.5.6 module-init-tools 3.11.1 patch 2.6.1 psmisc 22.10 cracklib 2.8.15 shadow 4.1.4.2 sysklogd 1.5 sysVinit 2.86 tar 1.22 info (GNU texinfo) 4.13 udev 151 vim 7.2 LFS-Bootscripts-20100124 wget 1.12 bc 1.06 OpenSSL 0.9.8n OpenSSH 5.3p1 which 2.20 Berkeley DB 4.8.26 tcp wrappers 7.6 portmap 6.0 nfs-utils 1.1.4 ntp 4.2.4p7 nasm 2.09.10 # This is available at www.nasm.us
# All of this must be done as root # add new music group Code: -------------------- groupadd -g 90 music -------------------- # add slimserver user Code: -------------------- useradd -c squeezeboxserver -d /usr/share/squeezeboxserver \ -g music -s /bin/false -u 115 squeezeboxserver -------------------- # create some variables for the version and download locations. Code: -------------------- version=7.7 version_minor=1 nightly='http://downloads.slimdevices.com/nightly/'$version'/sc' -------------------- # substitute latest build available at $nightly for build below # 31084 was latest as of 7/21/2010 # 31555 was latest as of 11/28/2010 # 33757 was latest as of 12/16/2011 Code: -------------------- build=33753 newdir=logitechmediaserver-$version.$version_minor-$build tarfile=$newdir.tgz -------------------- # Download squeezeboxserver (here, to /sources/other) Code: -------------------- cd /sources/other wget $nightly/$build/$tarfile -------------------- # We will install to /usr/share Code: -------------------- cd /usr/share/ tar xf /sources/other/$tarfile -------------------- # Change ownership of files to the new user and group we set up Code: -------------------- chown -R squeezeboxserver:music $newdir -------------------- # Create a soft link to squeezeboxserver to make updates easier, # and make the new user and group own it # (first remove any existing link for "squeezeboxserver") Code: -------------------- rm -f squeezeboxserver ln -sv $newdir squeezeboxserver chown squeezeboxserver:music -vh squeezeboxserver -------------------- # First, ensure that perl has been compiled with thread support. # Note that default compilation (under Linux From Scratch) is # _without_ thread support. Enter the following to determine if # perl was compiled with thread support. If perl does not have # thread support built in, then re-compile perl with thread support # before continuing. Code: -------------------- if ( perl --version | grep -iq multi ) then echo "perl has thread support - OK to continue" >&2 else echo "no thread support in perl - please re-compile" >&2 fi -------------------- # make a directory to do our work ... Code: -------------------- cd squeezeboxserver/CPAN mkdir repos cd repos/ -------------------- # Get the sources for the software we are about to compile ... Code: -------------------- wget -r -nd -l1 http://svn.slimdevices.com/repos/slim/$version/trunk/vendor/CPAN -------------------- # create a missing directory to avoid some warnings later... Code: -------------------- mkdir hints -------------------- # build the software - go have a beer while you're waiting ... Code: -------------------- sh buildme.sh cd ../.. -------------------- # Change the ownership of the files again ... Code: -------------------- chown -R squeezeboxserver:music . -------------------- # make needed subdirectories and files Code: -------------------- NAME=slimserver mkdir -pv /var/lib/$NAME/{playlist,plugin} mkdir -pv /var/cache/$NAME touch /var/log/$NAME.log chown -Rv squeezeboxserver:music /var/{lib,cache}/$NAME /var/log/$NAME.log -------------------- # modify bootscripts: # /etc/rc.d/init.d/slimserver (new) # /etc/rc.d/init.d/functions (revised) # Here is my bootscript: Code: -------------------- #!/bin/sh # on my system, rc_base=/etc/rc.d # Begin $rc_base/init.d/slimserver # Based on LFS fcron bootscript #$LastChangedBy: #$Date: 2011-12-17 . /etc/sysconfig/rc # Above file available at: # http://www.linuxfromscratch.org/lfs/view/development/scripts/apds01.html . $rc_functions # Above file available at: # http://www.linuxfromscratch.org/lfs/view/development/scripts/apds02.html PATH=/sbin:/bin:/usr/sbin:/usr/bin NAME=slimserver USER=squeezeboxserver APPDIR=/usr/share/$USER DAEMON=${APPDIR}/${NAME}.pl GROUP=music # substitute your music location below AUDIODIR=/mnt/media/music PLAYLISTDIR=/var/lib/$NAME/playlist CACHEDIR=/var/cache/$NAME LOGFILE=/var/log/$NAME.log PREFSDIR=/var/lib/$NAME PIDFILE=/var/run/$NAME.pid PRIORITY="-12" SLIMOPTS="--daemon" DATEFORMAT="+%F %H:%M:%S" CHARSET='en_US.ISO-8859-1' case "$1" in start) boot_mesg "Starting $NAME..." echo `date "$DATEFORMAT"` "$NAME starting." >> $LOGFILE LANG="$CHARSET" $DAEMON \ --user $USER \ --group $GROUP \ --audiodir $AUDIODIR \ --playlistdir $PLAYLISTDIR \ --cachedir $CACHEDIR \ --logfile $LOGFILE \ --prefsdir $PREFSDIR \ --pidfile $PIDFILE \ --priority $PRIORITY \ --charset "$CHARSET" \ $SLIMOPTS >> $LOGFILE 2>&1 evaluate_retval ;; stop) boot_mesg "Stopping $NAME..." killproc -p $PIDFILE $DAEMON echo `date "$DATEFORMAT"` "$NAME stopped." >> $LOGFILE ;; restart) $0 stop sleep 1 $0 start ;; status) statusproc -p $PIDFILE $DAEMON ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac # End $rc_base/init.d/slimserver -------------------- # create links: Code: -------------------- ln -sv ../init.d/slimserver $rc_base/rc0.d/K20slimserver ln -sv ../init.d/slimserver $rc_base/rc1.d/K20slimserver ln -sv ../init.d/slimserver $rc_base/rc2.d/K20slimserver ln -sv ../init.d/slimserver $rc_base/rc3.d/S50slimserver ln -sv ../init.d/slimserver $rc_base/rc4.d/S50slimserver ln -sv ../init.d/slimserver $rc_base/rc5.d/S50slimserver ln -sv ../init.d/slimserver $rc_base/rc6.d/K20slimserver -------------------- # Now you can start slimserver ... Code: -------------------- /etc/rc.d/init.d/slimserver start -------------------- -- Thomas8675309 ------------------------------------------------------------------------ Thomas8675309's Profile: http://forums.slimdevices.com/member.php?userid=23271 View this thread: http://forums.slimdevices.com/showthread.php?t=82583 _______________________________________________ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix