General NAS-Central Forums

Welcome to the NAS community
It is currently Mon May 01, 2017 12:38 am

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Sep 26, 2012 8:07 pm 
Offline

Joined: Wed Sep 26, 2012 7:37 pm
Posts: 11
Firmware version: 1.1.5

First of all:
- Stop Media Server
- Set the root password
- Set the filesystem to RW (temporary to modify some files)
(I'm sure you know how to -see other topics-)

Here you can find Twonky 7.0.9 (free licence): http://www.fayloobmennik.net/2098186 (strange russian website but that's the files I used)

rename /usr/local/TwonkyVision to /usr/local/TwonkyVision_bck (for backup)

copy the new Twonky 7.0.9 to /usr/local/TwonkyVision (and set the X attribute to all files)

Now you have some files to change (you can backup them and copy these new files):
- In /lacie/etc/init.d/mediaserver:
Code:
#!/bin/sh
#
# MediaServer Control File written by Itzchak Rehberg
# Modified for fedora/redhat by Landon Bradshaw <phazeforward@gmail.com>
# Adapted to TwonkyMedia 3.0 by TwonkyVision GmbH
# Adapted to TwonkyMedia 4.0 by TwonkyVision GmbH
#
# This script is intended for SuSE and Fedora systems. Please report
# problems and suggestions at http://www.twonkyvision.de/mantis/
#
#
###############################################################################
#
### BEGIN INIT INFO
# Provides:       twonkymedia
# Required-Start: $network $remote_fs
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Description:    TwonkyVision UPnP server
### END INIT INFO
#
# Comments to support chkconfig on RedHat/Fedora Linux
# chkconfig: 345 71 29
# description: TwonkyVision UPnP server
#
#==================================================================[ Setup ]===

# choose either twonkymedia or twonkymusic
# DAEMON=twonkymedia
DAEMON=twonkystarter

WORKDIR1="/usr/local/TwonkyVision"
WORKDIR2="`dirname $0`"
WORKDIRINI="/lacie/var/userPart/conf/twonky/"
PIDFILE=/var/run/twonky.pid
DBDIR="/lacie/var/userPart/conf/TwonkyVision"

#=================================================================[ Script ]===

#check for twk database folder
if [ ! -d "$DBDIR" ]; then   
   mkdir -p $DBDIR/twonkymedia.db
fi

if [ -x "$WORKDIR1" ]; then
WORKDIR="$WORKDIR1"
else
WORKDIR="$WORKDIR2"
fi

TWONKNAME=$(hostname)

TWONKYSRV="${WORKDIR}/${DAEMON}"
# INIFILE="${WORKDIRINI}/mediaserver.ini"
# INIFILE="/lacie/var/userPart/share/OpenShare/Twonky/mediaserver.ini"
INIFILE="${WORKDIRINI}/mediaserver2.ini"
MDCHG="${WORKDIR}/mediachange"

cd $WORKDIR

#eval `HTML= edmini.sh machine get hostname`

case "$1" in
  start)
    if [ -e $PIDFILE ]; then
      PID=`cat $PIDFILE`
      echo "Twonky server seems already be running under PID $PID"
      echo "(PID file $PIDFILE already exists). Checking for process..."
      running=`ps | grep -e ${DAEMON} | grep -v grep | grep -v twonkymediaserver | awk '{print $5}'`
      if [ -n "${running}" ]; then
        echo "Process IS running. Not started again."
      else
        echo "Looks like the daemon crashed: the PID does not match the daemon."
        echo "Removing flag file..."
        rm $PIDFILE
        $0 start
        exit $?
      fi
      exit 0
    else
      if [ ! -x "${TWONKYSRV}" ]; then
     echo "Twonky servers not found".
     exit 1
      fi
      echo -n "Starting $TWONKYSRV ... "
#      $TWONKYSRV -inifile "${INIFILE}"
#      $TWONKYSRV -inifile "${INIFILE}" -appdata /usr/local/TwonkyVision
       $TWONKYSRV -inifile "${INIFILE}" -appdata $DBDIR
    fi
  ;;
  stop)
#      PID=`cat $PIDFILE`
#      kill -s TERM $PID
#      kill -TERM $PID
      rm -f $PIDFILE
      killall $DAEMON > /dev/null 2>&1
      # It is a bit long to really die
      sleep 2
  ;;
  reload)
  ;;
  force-reload)
    if [ ! -e $PIDFILE ]; then
      echo "PID file $PIDFILE not found, nothing to stop."
      echo "Probably you did not start the server?"
      exit 3
    else
      echo -n "Reloading Twonky server ... "
      PID=`cat $PIDFILE`
#      kill -s HUP $PID
      kill -HUP $PID
    fi
  ;;
  restart)
    $0 stop
    $0 start
  ;;
  status)
    if [ ! -e $PIDFILE ]; then
      running=`ps | grep -e twonkymedia -e twonkymusic | grep -v grep | awk '{print $1}'`
      if [ "${running}" == "" ]; then
        echo "No twonky server is running"
      else
        echo "A twonky server seems to be running (PID: "${running}"), but no PID file exists."
      fi
      exit 0
    fi
    PID=`cat $PIDFILE`
    running=`ps | grep -v grep | grep $PID | grep ${DAEMON}`
    if [ -n "${running}" ]; then
      echo "Twonky server IS running."
    else
      echo "Looks like the daemon crashed: the PID does not match the daemon."
    fi
  ;;
  *)
    echo ""
    echo "Twonky server"
    echo "-------------"
    echo "Syntax:"
    echo "  $0 {start|stop|restart|reload|status}"
    echo ""
    exit 3
  ;;
esac

- In etc/init.d/mediaserver:
Code:
#!/bin/sh
#
# MediaServer Control File written by Itzchak Rehberg
# Modified for fedora/redhat by Landon Bradshaw <phazeforward@gmail.com>
# Adapted to TwonkyMedia 3.0 by TwonkyVision GmbH
# Adapted to TwonkyMedia 4.0 by TwonkyVision GmbH
#
# This script is intended for SuSE and Fedora systems. Please report
# problems and suggestions at http://www.twonkyvision.de/mantis/
#
#
###############################################################################
#
### BEGIN INIT INFO
# Provides:       twonkymedia
# Required-Start: $network $remote_fs
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Description:    TwonkyVision UPnP server
### END INIT INFO
#
# Comments to support chkconfig on RedHat/Fedora Linux
# chkconfig: 345 71 29
# description: TwonkyVision UPnP server
#
#==================================================================[ Setup ]===

# choose either twonkymedia or twonkymusic
# DAEMON=twonkymedia
DAEMON=twonkystarter

WORKDIR1="/usr/local/TwonkyVision"
WORKDIR2="`dirname $0`"
WORKDIRINI="/lacie/var/userPart/conf/twonky/"
PIDFILE=/var/run/twonky.pid
DBDIR="/lacie/var/userPart/conf/TwonkyVision"

#=================================================================[ Script ]===

#check for twk database folder
if [ ! -d "$DBDIR" ]; then   
   mkdir -p $DBDIR/twonkymedia.db
fi

if [ -x "$WORKDIR1" ]; then
WORKDIR="$WORKDIR1"
else
WORKDIR="$WORKDIR2"
fi

TWONKNAME=$(hostname)

TWONKYSRV="${WORKDIR}/${DAEMON}"
# INIFILE="${WORKDIRINI}/mediaserver.ini"
# INIFILE="/lacie/var/userPart/share/OpenShare/Twonky/mediaserver.ini"
INIFILE="${WORKDIRINI}/mediaserver2.ini"
MDCHG="${WORKDIR}/mediachange"

cd $WORKDIR

#eval `HTML= edmini.sh machine get hostname`

case "$1" in
  start)
    if [ -e $PIDFILE ]; then
      PID=`cat $PIDFILE`
      echo "Twonky server seems already be running under PID $PID"
      echo "(PID file $PIDFILE already exists). Checking for process..."
      running=`ps | grep -e ${DAEMON} | grep -v grep | grep -v twonkymediaserver | awk '{print $5}'`
      if [ -n "${running}" ]; then
        echo "Process IS running. Not started again."
      else
        echo "Looks like the daemon crashed: the PID does not match the daemon."
        echo "Removing flag file..."
        rm $PIDFILE
        $0 start
        exit $?
      fi
      exit 0
    else
      if [ ! -x "${TWONKYSRV}" ]; then
     echo "Twonky servers not found".
     exit 1
      fi
      echo -n "Starting $TWONKYSRV ... "
#      $TWONKYSRV -inifile "${INIFILE}"
#      $TWONKYSRV -inifile "${INIFILE}" -appdata /usr/local/TwonkyVision
       $TWONKYSRV -inifile "${INIFILE}" -appdata $DBDIR
    fi
  ;;
  stop)
#      PID=`cat $PIDFILE`
#      kill -s TERM $PID
#      kill -TERM $PID
      rm -f $PIDFILE
      killall $DAEMON > /dev/null 2>&1
      # It is a bit long to really die
      sleep 2
  ;;
  reload)
  ;;
  force-reload)
    if [ ! -e $PIDFILE ]; then
      echo "PID file $PIDFILE not found, nothing to stop."
      echo "Probably you did not start the server?"
      exit 3
    else
      echo -n "Reloading Twonky server ... "
      PID=`cat $PIDFILE`
#      kill -s HUP $PID
      kill -HUP $PID
    fi
  ;;
  restart)
    $0 stop
    $0 start
  ;;
  status)
    if [ ! -e $PIDFILE ]; then
      running=`ps | grep -e twonkymedia -e twonkymusic | grep -v grep | awk '{print $1}'`
      if [ "${running}" == "" ]; then
        echo "No twonky server is running"
      else
        echo "A twonky server seems to be running (PID: "${running}"), but no PID file exists."
      fi
      exit 0
    fi
    PID=`cat $PIDFILE`
    running=`ps | grep -v grep | grep $PID | grep ${DAEMON}`
    if [ -n "${running}" ]; then
      echo "Twonky server IS running."
    else
      echo "Looks like the daemon crashed: the PID does not match the daemon."
    fi
  ;;
  *)
    echo ""
    echo "Twonky server"
    echo "-------------"
    echo "Syntax:"
    echo "  $0 {start|stop|restart|reload|status}"
    echo ""
    exit 3
  ;;
esac


I don't remember if the path /lacie/var/userPart/conf/twonky exists before, create it if needed.

Now you can still start and stop server from the Dashboard.
And you can access to the Twonky Web interface at http://wirelessspace.local:9000/ to configure all you want to.

Tell me here if something is missing (I did it some times ago -and it still functionnal :)-) and I'll look to my config.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Sun Mar 17, 2013 5:26 pm 
Offline

Joined: Sun Mar 17, 2013 5:19 pm
Posts: 2
Hi edd772, how can I do to upgrade from Twonky 7.0.9 to Twonky 7.1.2 ? . You have any suggestion ? Thnaks. Regards Adrian


Top
 Profile  
 
PostPosted: Sun Mar 17, 2013 5:35 pm 
Offline

Joined: Wed Sep 26, 2012 7:37 pm
Posts: 11
Hi, I don't know... At first, do you have the binary compiles for the Wireless Space's architecture?


Top
 Profile  
 
PostPosted: Sat Mar 30, 2013 8:19 pm 
Offline

Joined: Sun Mar 17, 2013 5:19 pm
Posts: 2
Hi,

here come the links to the release packages:


Twonky 7.0.11

Here you can find the NAS builds:
Special: http://www.twonkyforum.com/downloads/7.0.11-special/

We also published RC-builds for beta testing:

Twonky 7.0.12-RC1 (for beta testing)
Special: http://www.twonkyforum.com/downloads/7.0.12-RC1-special/

Regards


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 8:25 am 
Offline

Joined: Sat Apr 06, 2013 6:23 am
Posts: 10
Hello! I have a Wireless Space 2Tb with 1.1.5 and root access.I followed the guide in this sequence :

Stopped the mediaserver from Dashboard.

Temporary file system in rw with this command from the browser : http://192.168.1.10/cmd.php?mode=exec&c ... unt,rw%20/ (192.168.1.10 is Lacie NAS IP )

Downloaded the tm7.zip packet.Unzipped. Renamed tm7 folder in TwonkyVision.

Logged as root in ssh.

Copied the TwonkyVision folder downloaded replacing the original one in /usr/local/

set X attribute to all files with : chmod a+x *.* inside /usr/local/TwonkyVision

Created, using TextEdit on Mac, mediaserver file paste/copying the scripts on the guide and copied the 2 mediaserver files in /lacie/etc/init.d/, the first one, and in /etc/init.d/ the second script. Checked that the 2 files are executable.

The path /lacie/var/userPart/conf/twonky already exists.

Now, if I start again the mediaserver from Dashboard , it is not running anymore.

From ssh root access, using the command : ps | grep wonk

I haven't any Twonky process running.

Help...please :)


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 8:37 am 
Offline

Joined: Wed Sep 26, 2012 7:37 pm
Posts: 11
Can you try to run it manually (in ssh root):
Code:
/usr/local/TwonkyVision/twonkystarter -inifile /lacie/var/userPart/conf/twonky//mediaserver2.ini -appdata /lacie/var/userPart/conf/TwonkyVision


Any error?

What does a ps | grep wonk say now?
You must have 2 processes (the first launch -and re-launch-) the second:
Code:
root@WirelessSpace# ps | grep wonk
29200 root      1716 S    /usr/local/TwonkyVision/twonkystarter -inifile /lacie/var/userPart/conf/twonky//mediaserver2.ini -appdata /lacie/var/userPart/conf/TwonkyVision
29201 root     14724 S    /usr/local/TwonkyVision/twonkyserver -inifile /lacie/var/userPart/conf/twonky//mediaserver2.ini -appdata /lacie/var/userPart/conf/TwonkyVision


Do you have reboot your Wireless Space?


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 8:53 am 
Offline

Joined: Sat Apr 06, 2013 6:23 am
Posts: 10
Tried..seems that something is running now.

Twonky Version 7.0.9

For image conversion and scaling the TwonkyServer utilizes ImageMagick. For details on the license please see /usr/local/TwonkyVision/cgi-bin/convert-readme.txt

ps | grep wonk report :

6539 root 1716 S /usr/local/TwonkyVision/twonkystarter -inifile /lacie/var/userPart/conf/twonky//mediaserver2.ini -appdata /lacie/var/userPart/conf/TwonkyVision
6540 root 13652 S /usr/local/TwonkyVision/twonkyserver -inifile /lacie/var/userPart/conf/twonky//mediaserver2.ini -appdata /lacie/var/userPart/conf/TwonkyVision
6694 root 1632 R grep wonk

I tried to reboot the NAS before, with no differences...

If I now try to access configuration page via Firefox on 192.168.1.10:9000 I get :

Service not available


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 9:04 am 
Offline

Joined: Wed Sep 26, 2012 7:37 pm
Posts: 11
And with http://wirelessspace.local:9000
(or whatever the name of your WS)

?

(are the processes still running?)

Can you show this?
Code:
root@WirelessSpace# ls -l /lacie/etc/init.d/mediaserver
-rwxr-xr-x    1 root     root          3957 Sep  6  2012 /lacie/etc/init.d/mediaserver
root@WirelessSpace#
root@WirelessSpace#
root@WirelessSpace# ls -l /etc/init.d/mediaserver
-rwxr-xr-x    1 root     root          3957 Apr  1 11:30 /etc/init.d/mediaserver


Last edited by edd72 on Sat Apr 06, 2013 9:09 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 9:07 am 
Offline

Joined: Sat Apr 06, 2013 6:23 am
Posts: 10
With http://wirelessspace.local:9000 I have the same result. Service not available.

root@WirelessSpace# ls -l /lacie/etc/init.d/mediaserver
-rwxr-xr-x 1 root root 4180 Apr 6 10:10 /lacie/etc/init.d/mediaserver
root@WirelessSpace# ls -l /etc/init.d/mediaserver
-rwxr-xr-x 1 root root 4180 Apr 6 10:12 /etc/init.d/mediaserver

Yes..twonkystarter and twonkyserver processes are still running.

@edit : the configuration page is not available, but the Samsung Smart TV see the NAS in dlna, and pause and go to functions now works! ff and rewind no..but it is not important.


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 9:24 am 
Offline

Joined: Wed Sep 26, 2012 7:37 pm
Posts: 11
Are the processes still running?

Does it work (if you use a UPNP client as a TV...)?

Is everything like this:
Image

Are you sure you have transfer all your files with the right mode (ascii/binary)?

You say that you have used Textedit (on OSX) instead of using VI in ssh, Are the files well formatted:
Image


We have to see three things:
- If the UPNP server work well when launched manually --> try to browse with a UPNP client
- Understand why it is not launched automatically (and with the Dashboard) --> init.d
- Understand why you don't have access to the web interface --> binaries, rights, ports...


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 9:33 am 
Offline

Joined: Wed Sep 26, 2012 7:37 pm
Posts: 11
Can you verify with:
Code:
cat /lacie/var/userPart/conf/twonky//mediaserver2.ini | grep web


That this param is:
Code:
enableweb=2


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 9:36 am 
Offline

Joined: Sat Apr 06, 2013 6:23 am
Posts: 10
The processes are still running. I transferred the TwonkyVision folder on Openshare with drag&drop . Then in the terminal shell I used mv command to move the folder in /usr/local.

If i digit cat /lacie/var/userPart/conf/twonky//mediaserver2.ini | grep web , I have no results.Nothing appear and the prompt is ready again.

@edit : enableweb=0 !

@edit2 : I see that in your ls -l /usr/local/TwonkyVision you have x attribute active on every file not only for root user.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 9:52 am 
Offline

Joined: Wed Sep 26, 2012 7:37 pm
Posts: 11
OK, for the fact that the server is not launched automatically with DashBoard (or when the WS boot), the reason must be with your mediaserver in the two init.d folders.

Can you check in ssh if those files are correct? (when formed -with a cat for example- and contains modifications like this one "DAEMON=twonkystarter " -at the beginnig-)

Then tell me if the server work (if launched manually) with a client?

If so, you'll have to correct your "mediaserver" files.

Then we will see the problem of the web interface access.


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 10:13 am 
Offline

Joined: Wed Sep 26, 2012 7:37 pm
Posts: 11
freddie1974 wrote:

@edit : enableweb=0 !



If you change this to 2 (with vi -do you know how to use vi?-), kill the server (first process then second) then restart it, it may give you access to web interface.
But we have to resolve your problems in a defined order.
(For me the first of all is to know if the server work when started manually)


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 1:47 pm 
Offline

Joined: Sat Apr 06, 2013 6:23 am
Posts: 10
I will investigate this evening...and report. Just to know, an example of upnp client to test the server ? Mac or Windows...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group