NAS restart reconfigures my Twonkey shares. How to prevent?

Post Reply
pvdveen
Posts: 21
Joined: Sat Dec 17, 2011 11:02 am

NAS restart reconfigures my Twonkey shares. How to prevent?

Post by pvdveen » Sun Dec 18, 2011 10:16 am

Hi

Afer getting access to the twonkey webaccess i reconfigured the shares Twonkey should ues.

By default it searches all the share that where added by the dashboard. I only wanted to have it access one share.

However, after the NAS restarted after a deep sleep the twonley shares where back to its original values.

Any ideas how that can be prevented?


Peter

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: NAS restart reconfigures my Twonkey shares. How to preve

Post by Mijzelf » Sun Dec 18, 2011 12:16 pm

I have no experience with Twonky, but I suppose it's works the same as all other services. The firmware (unicorn, to be exact) keeps a database of all user-interface accessible settings, and on boot the conf files of the relevant services are (re)created, overwriting all handcrafted changes.
There is no easy way of keeping unicorn of doing so, but fortunately it's easy to let twonky just use another conf file.
Have a look at the startscript /etc/initng/twonkymedia.i:

Code: Select all

#!/sbin/itype
# This is a i file, used by initng parsed by install_service

daemon twonkymedia {
        need = bootmisc virtual/net;
        script daemon = {
                /bin/rm -f /usr/local/twonkymedia/twonkymediaserver-log.txt;
                /usr/local/twonkymedia/twonkymedia -inifile /usr/local/twonkymedia/twonkymedia-server.ini -logfile /var/log/twonkymedia.log -v 1;
        }
        pid_file = /var/run/twonky.pid;
        forks;
}
Here the inifile is specified. So you have to copy /usr/local/twonkymedia/twonkymedia-server.ini to another file, edit this .i file to reflect that, and restart the box.

Of course unicorn can no longer change twonky's settings, so you won't be able to use the standard userinterface for that.

pvdveen
Posts: 21
Joined: Sat Dec 17, 2011 11:02 am

Re: NAS restart reconfigures my Twonkey shares. How to preve

Post by pvdveen » Mon Dec 19, 2011 6:18 pm

Thx :)

I renamed the ini file, put in some new shares and altered the line you showed to the new ini file.

That worked. After restarting the server the shares keep the same :)

andreus
Posts: 134
Joined: Wed Dec 16, 2009 9:57 pm

Re: NAS restart reconfigures my Twonkey shares. How to preve

Post by andreus » Wed Jan 04, 2012 8:20 pm

I don't know if that setting is predefinid in unicorn, but if it is, you should also change in '/usr/lib/python2.6/site-packages/unicorn/multimedia/upnp.py' the default torrents dir so if for some reason unicorn restart your twonky configuration (it does that sometimes) it will update it with the values in this file.

Post Reply