eg-blog

Feed Rss

subsonic4.6_spkv16 download

12.10.2011, Allgemein, Download / Release Notes, Subsonic on Synology DS, by .

Download: subsonic4.6_spkv16

  • ffmpeg and lame are included for transcoding
  • the Subsonic folders are set to /volume1/music/… change them in the Subsonic menu if your music is somewhere else
  • DSM link doesn’t work (it is hard linked to http://192.168.0.3:4040)
  • Update doesn’t work properly

Scripts

INFO
package="Subsonic"
version="4.6 syno_package_v15"
maintainer="Sindre Mehus, syno package maintained at synology-forum.de"
description="Subsonic is a free, web-based media streamer, providing ubiquitous access to your music."
arch="88f6281 88f6282"
firmware="3.1-1594"
preinst (this script and parts of other scripts were copied from scripts published on pcloadletter.co.uk)
#!/bin/sh

#--------Subsonic preinstall script
#--------package maintained at synology-forum.de

source /etc/profile

########################################
#check if Jva is installed

if [ -z ${JAVA_HOME} ]; then
 echo "Java is not installed or not properly configured. JAVA_HOME is not defined. " > $SYNOPKG_TEMP_LOGFILE
 echo "Download and install the Java Synology package from http://wp.me/pVshC-z5" >> $SYNOPKG_TEMP_LOGFILE
 exit 1
fi

if [ ! -f ${JAVA_HOME}/bin/java ]; then
 echo "Java is not installed or not properly configured. The Java binary could not be located. " > $SYNOPKG_TEMP_LOGFILE
 echo "Download and install the Java Synology package from http://wp.me/pVshC-z5" >> $SYNOPKG_TEMP_LOGFILE
 exit 1
fi

exit 0
postinst
#!/bin/sh

#--------SUBSONIC postinstall script
#--------package maintained at synology-forum.de

####################################
#subsonic user settings

#create subsonic daemon user
synouser --add subsonic `${SYNOPKG_PKGDEST}/passgen 1 20` "Subsonic daemon user" 0 "" ""

#determine the subsonic user homedir and save that variable in the user's profile
#this is needed because librtmp needs to write a file called ~/.swfinfo
#and new users seem to inherit a HOME value of /root which they have no permissions for
SUBSONIC_HOMEDIR=`cat /etc/passwd | sed -r '/Subsonic daemon user/!d;s/^.*:Subsonic daemon user:(.*):.*$/\1/'`
su - subsonic -s /bin/sh -c "echo export HOME=${SUBSONIC_HOMEDIR} >> .profile"

#set ownership of Subsonic folder tree
chown -R subsonic ${SYNOPKG_PKGDEST}

#####################################
#other stuff

#make the Subsonic start script executable
chmod +x ${SYNOPKG_PKGDEST}/subsonic.sh

#set up symlink for the DSM GUI
if [ -d /usr/syno/synoman/webman/3rdparty ]; then
	ln -s ${SYNOPKG_PKGDEST}/ /usr/syno/synoman/webman/3rdparty/Subsonic
fi

exit 0
preupgrade
#!/bin/sh

#--------Subsonic preupgrade script
#--------package maintained at synology-forum.de

###########################
#stop Subsonic if it is runing

#variable for process ID
PID=""

#use "-f 1"
PID=`ps |grep java |grep subsonic |cut -d " " -f 1`
#if PID is if [ -z $PID ]; then
	PID=`ps |grep java |grep subsonic |cut -d " " -f 2`
fi

if [ -z $PID ]; then
   sleep 1
else
   kill $PID
   sleep 5
fi

###########################
#backup subsonic.properties and db Folder

mkdir ${SYNOPKG_PKGDEST}/../subsonic_update_backup
cp ${SYNOPKG_PKGDEST}/subsonic.properties ${SYNOPKG_PKGDEST}/../subsonic_update_backup/
cp -r ${SYNOPKG_PKGDEST}/db ${SYNOPKG_PKGDEST}/../subsonic_update_backup

exit 0
postupgrade
#!/bin/sh

#--------SUBSONIC postupgrade script
#--------package maintained at synology-forum.de

################################
#make it working again

#subsonic daemon user has been deleted and recreated so we need to reset ownership (new UID)
chown -R subsonic ${SYNOPKG_PKGDEST}/

#restart Web Station to clear webserver caches
if [ -f /usr/syno/etc/rc.d/S97apache-user.sh ]; then
	/usr/syno/etc/rc.d/S97apache-user.sh restart
fi

###############################
#start and stop subsonic for first initialisation

#start subsonic
su - subsonic -s /bin/sh -c /usr/syno/synoman/webman/3rdparty/Subsonic/subsonic.sh

sleep 60

#stop subsonic
#use "-f 1"
PID=`ps |grep java |grep subsonic |cut -d " " -f 1`

#if PID is if [ -z $PID ]; then
   PID=`ps |grep java |grep subsonic |cut -d " " -f 2`
fi

kill $PID

sleep 5

###############################
#restore subsonic.propierties and db folder

cp ${SYNOPKG_PKGDEST}/../subsonic_update_backup/subsonic.properties ${SYNOPKG_PKGDEST}/
cp -r ${SYNOPKG_PKGDEST}/../subsonic_update_backup/db ${SYNOPKG_PKGDEST}/

#remove backup folder
#clear the next line if you want to keep a backup in the @appstore folder
#rm -r ${SYNOPKG_PKGDEST}/../subsonic_update_backup/

#restart Web Station to clear webserver caches
if [ -f /usr/syno/etc/rc.d/S97apache-user.sh ]; then
	/usr/syno/etc/rc.d/S97apache-user.sh restart
fi

exit 0
preuninstall
#!/bin/sh

#--------SUBSONIC preuninstall script
#--------package maintained at synology-forum.de

#stop Subsonic if it is runing

#variable for process ID
PID=""

#use "-f 1"
PID=`ps |grep java |grep subsonic |cut -d " " -f 1`
#if PID is if [ -z $PID ]; then
	PID=`ps |grep java |grep subsonic |cut -d " " -f 2`
fi

if [ -z $PID ]; then
    sleep 1
else
   kill $PID
   sleep 5
fi

exit 0
postuninstall
#!/bin/sh

#--------SUBSONIC postuninstall script
#--------package maintained at synology-forum.de

#remove subsonic daemon user
synouser --del subsonic

#remove DSM icon symlink
rm /usr/syno/synoman/webman/3rdparty/Subsonic

#remove temp files
rm -r /tmp/subsonic

exit 0
start-stop-status
#!/bin/sh

#--------Subsonic start-stop-status script
#--------package maintained at synology-forum.de

#variable for process ID
PID=""

##############################################
#function to get the process id of Subsonic

subsonic_get_pid ()
{
   #use "-f 1"
   PID=`ps |grep java |grep subsonic |cut -d " " -f 1`

   #if PID is    if [ -z $PID ]; then
      PID=`ps |grep java |grep subsonic |cut -d " " -f 2`
   fi
}

case "$1" in
   start)
      # starting subsonic as subsonic daemon user
      su - subsonic -s /bin/sh -c /usr/syno/synoman/webman/3rdparty/Subsonic/subsonic.sh
      sleep 5
	  exit 0
   ;;
   stop)
      #stop subsonic
	  subsonic_get_pid
      kill $PID
      sleep 2

	  #delete temp files
	  rm -r /tmp/subsonic
	  exit 0
   ;;
   status)
      subsonic_get_pid
      if [ -z  $PID ]; then
	  #Subsonic is not running
		exit 1
	  else
	  #subsonic is running
		exit 0
      fi
   ;;
   log)
	  echo "${SYNOPKG_PKGDEST}/subsonic.log"
	  exit 0
   ;;
esac

3 Kommentare zu subsonic4.6_spkv16 download

  1. It’s the best time to make some plans for the future and it’ѕ time to be happy.
    I’ve read this post and if I could I desire to suggest you few interesting things or tips. Maybe you can write next articles referring to this article. I wish to read even more things about it!

    Feel free to visit my blog; bandwidth limiter

    Antworten
  2. Do not abuse the trust of the mentor by constantly getting information you
    could manage reading. Be sure to avoid horizontal scrolling, that is never recommended by web site
    design standards. If you want to decide if the best place is a great spot for apartments,
    you are able to ask your realtor since they’re well-aware in the things
    that ought to be considered before building your property.

    Antworten
  3. In addition, the landlord can be necessary to keep every one of the equipment and services regarding the supply of gas, electric, heating, water and
    sanitation in good repair. Bulgaria has one of Europe’s most varied landscapes, through the immense lowlands with the Danube Plains
    inside north, the highlands inside the south and the beaches, with miles of marine
    grandeur of the Black Sea coast. People decide to invest in property in order to develop a portfolio of cashflow which you can use as being a
    pension or that may replace their current income.

    Antworten

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>