eg-blog

Feed Rss

Archive for the ‘Allgemein’ Category

Download: subsonic4.6_spkv17

  • Update should now work properly
  • a backup is kept in /volumeX/@appstore/subsonic_update_backup even after uninstall
  • DSM link is dynamic now
  • Subsonic music folder is set to /volume1/music. Change it if your music is somewhere else

Scripts

INFO
package="Subsonic"
version="4.6-17"
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"
package_icon="<base64 code of package center icon, far too long to post it here>"
install_reboot="yes"
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

#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 <10000 than "-f 1" is empty so use "-f 2"
   if [ -z $PID ]; then
      PID=`ps |grep java |grep subsonic |cut -d " " -f 2`
   fi
}

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

subsonic_get_pid

kill $PID
sleep 5
#delete temp files
rm -r /tmp/subsonic

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

mkdir ${SYNOPKG_PKGDEST}/../subsonic_update_backup
cp ${SYNOPKG_PKGDEST}/subsonic.properties *.index ${SYNOPKG_PKGDEST}/../subsonic_update_backup/
cp -r ${SYNOPKG_PKGDEST}/db ${SYNOPKG_PKGDEST}/../subsonic_update_backup
cp -r ${SYNOPKG_PKGDEST}/lucene ${SYNOPKG_PKGDEST}/../subsonic_update_backup
cp -r ${SYNOPKG_PKGDEST}/thumbs ${SYNOPKG_PKGDEST}/../subsonic_update_backup

exit 0
postupgrade
#!/bin/sh

#--------SUBSONIC postupgrade 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 <10000 than "-f 1" is empty so use "-f 2"
   if [ -z $PID ]; then
      PID=`ps |grep java |grep subsonic |cut -d " " -f 2`
   fi
}

################################
#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 as subsonic user
su - subsonic -s /bin/sh -c /usr/syno/synoman/webman/3rdparty/Subsonic/subsonic.sh

#give it some time to start up
sleep 90

#stop subsonic
subsonic_get_pid
kill $PID
sleep 5
#delete temp files
rm -r /tmp/subsonic

#sleep 5

###############################
#restore subsonic db index and settings

cp -r ${SYNOPKG_PKGDEST}/../subsonic_update_backup/* ${SYNOPKG_PKGDEST}/

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

exit 0
preuninstall
#!/bin/sh

#--------SUBSONIC preuninstall 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 <10000 than "-f 1" is empty so use "-f 2"
   if [ -z $PID ]; then
      PID=`ps |grep java |grep subsonic |cut -d " " -f 2`
   fi
}

subsonic_get_pid

if [ -z $PID ]; then
	sleep 1
else
	kill $PID
	sleep 5
	#delete temp files
	rm -r /tmp/subsonic
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

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 <10000 than "-f 1" is empty so use "-f 2"
   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

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

Wie heißt es doch so schön von den Beastie Boys: “Don’t believe the hype!”

Mir gefällts aber ziemlich gut ;)

Am 2. Dezember ist sein 2. Mixtape “Easy” erschienen, dass es hier gratis zum download gibt:

Cro – Easy Mixtape Download

Heute noch keine Reitzüberflutung gehabt?

Song: Turn it down – Kaskade (Le Castle Vania Remix) download bei Beatport