Editing the ini file

Linux and UNIX specific discussions
Post Reply
niknak
Posts:1
Joined:Tue Nov 17, 2009 3:13 pm
AV Hardware:popcorn hour
Editing the ini file

Post by niknak » Tue Nov 17, 2009 3:18 pm

All

i have a need to edit the ini file via command line rather than the UI.

But, i have been unsuccessful in being able to do this with sed on Linux.

Running ubuntu, I putty in , and try a sed in place or sed with temp file. command executes with no errors , file stamp is changed but nothing is edited within the file, irrespective of what i wish to change.

example - i want to sed in place radio=1 to radio=0 , it just cannot be done. What am I missing here and can anyone help with why this would not work?

PeeBee
Posts:392
Joined:Sat Jun 13, 2009 12:16 pm
AV Hardware:Buffalo LS Pro; PS3; Samsung LE37B650

Re: Editing the ini file

Post by PeeBee » Tue Nov 17, 2009 8:20 pm

You cannot edit the ini file when it is in use - Twonky seems to encrypt it somehow so it shows up in vi as garbage although it displays OK by using cat.

The way round this is to make the changes you need via an RPC call:

http://<twonky-ip>:9000/rpc/set_option?radio=0

http://twonky-ip:9000/rpc/get_option?radio will return the current value.

PB
Samsung LE37B650T2WXXU; Liteon 5055GDL+ HDD/DVD Recorder; Playstation 3; Iomega Screenplay HD 500GB; Buffalo Linkstation Pro LS-320GL (running Twonky 6.0.30, SqueezeBox Server 7.6 and acting as a Print Server)

Post Reply