Thank you - that's helpful!
Especially your suggestion to remove the appdata for upgrade. I hadn't done that in my 8.5.0 upgrade, and I was having to log to the Lynx website via the Twonky admin UI every time my server (NAS box) was restarted. I just noticed that some advice has been added to do this on the download page
http://download.twonky.com/ too:
"Please also note that if you are having trouble entering your license key or if it is not saved correctly the workaround is to delete the “appdata” folder.
You can retrieve the path by entering:
http://yourip:9000/rpc/get_option?appdata"
I wondered if there was some trick I'd been missing. For example, the twonkyserver.ini file contains these lines
Code: Select all
# Indicates whether initial setup is completed or not
initialsetupdone=1
Maybe editing that at each upgrade would have helped me? In future I think that I'll just bite off the annoyance of always starting with a clean configuration.
I run twonky from a normal user account. In my install I've been keeping the Twonky appdata folder inside the Twonky install folder, so I have a history of Twonky install folders on my disk like this:
drwxrwxrwx 6 504 703 4096 Apr 26 2015 twonky639
drwxrwxrwx 6 root root 4096 Apr 26 2015 twonky709
drwxrwxrwx 6 504 703 4096 Apr 26 2015 twonky728
drwxrwxrwx 6 504 703 4096 Aug 10 2016 twonky803
drwxrwxrwx 7 504 703 4096 Aug 10 2016 twonky830
drwxrwxrwx 7 504 703 4096 May 23 21:27 twonky850
And also set of simple start scripts that look like this:
-rwxrwxrwx 1 504 703 2465 Apr 26 2015 starttwonky639.sh
-rwxrwxrwx 1 root root 2549 Apr 26 2015 starttwonky709.sh
-rwxrwxrwx 1 504 703 2638 Apr 26 2015 starttwonky728.sh
-rwxrwxrwx 1 504 703 2472 Apr 26 2015 starttwonky803.sh
-rwxrwxrwx 1 504 703 2472 Aug 10 2016 starttwonky830.sh
-rwxr-xr-x 1 root root 2472 Nov 25 2017 starttwonky850.sh
The start scripts start twonky using a command line that includes the -appdata and -logfile command line options, which allows me to very easily switch between them.
My steps to upgrade have been:
- Log in (ssh) to the twonky user account
- Create a new directory for the new release (so for Twonky version 8.5.1, mkdir twonky851)
- Unpack the release zip file into the new folder (unzip twonky-XXX.zip -d twonky851)
- [I won't do this any more] Copy the config from my previously used twonky into it (cp -R ./twonky850/appdata ./twonky851)
- Copy my previously used starttwonkyxxx.sh script, and edit it to point to the new install (see below)
- Make some edits to the resources/views/view-definitions.xml file to make the Navigation Trees look like I want them too
My starttwonkyXXX.sh files look like this (where XXX is the version numbers):
Code: Select all
#!/bin/sh
TWONKYDIR=/home/twonky/twonkyXXX
# Stop any twonky server that is already running
killall twonkystarter && sleep 5
killall -9 twonkystarter
killall -9 twonkyserver
killall -9 twonkymedia
APPDATADIR=${TWONKYDIR}/appdata
TWONKYLOG=${APPDATADIR}/twonkyserver-log.txt
TWONKYSRV=twonkystarter
cd ${TWONKYDIR}
## Create a directory for working files (-p for 'if not existing already'):
mkdir -p "${APPDATADIR}"
# Use a command line option to specify the location of the application data
# (which includes the ini file) and log file:
"./$TWONKYSRV" -logfile "${TWONKYLOG}" -appdata "${APPDATADIR}"
# If -appdata is not given on the command line and the user running twonky has a home
# directory then .twonky is created in the home directory and used for appdata.
# If Upload is enabled but no upload folders are specified then a directory
# Twonky will be created and used for music, photo and video uploads