Made a mistake with VI

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
So Transmission has a standard limit of 5 concurrent downloads, i wanted to up this to 10 because i have 5 downloads that have been going for ages, progressing slowly each month. So i tried to look into how to change this, i found a thread about someone who did this and tried to replicate it. But when i used a similar command to my personal server, i got to see the .json file and i saw the "download-queue-size": 5, line but i couldn't edit that number. Not knowing what to do next i just closed the browserwindow and thought i'll look into it another time. So i kept looking and i found further down in the thread a post that had a "edit" command which i thought would allow me to see the same file but would also allow me to edit it. This for some reason gave me nothing but ~~~~ signs on every line that previously had text. What i did wrong i don't know, i knew that i couldn't do anything with this so i just closed the browsertab again. Now when i try to go to the webgui of transmission i just get a simple "this site isn't reachable".

So like my header says, i'm pretty sure i made a mistake with the "vi /usr/local/etc/transmission/home/settings.json " command or with the "edit /mnt/(v1 - insert yours)/iocage/jails/transmission/root/usr/local/etc/transmission/home/settings.json". Most likely the edit command. But i got no experience at all with the vi command which is some sort of text editor for command line if google is right? So i'm a bit at a loss at what to do next. Is this easily fixable? Or should i reinstall Transmission?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
From Googling around, try stopping the Transmission plugin, and deleting the settings.json file at /mnt/<your pool name here>/iocage/jails/transmission/root/usr/local/etc/transmission/home/settings.json. On the next start, Transmission will install a default settings.json file you can then customize.

If vi isn't your speed for editors, you can try nano.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
nano is much easier to use (IMO) than vi, but not part of a standard jail install (though it's easy enough to install). Another easy-to-use editor that is part of the standard jail is ee.
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
I just deleted the file, started the plugin and i still get the same "this site can't be reached" message. Also no new settings.json file got made.

On a side note, before deleting the file i tried opening it with notepad and changed the line that way, seemed to work fine so maybe that's a safer way to go at it then command line next time?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Definitely not safe, Notepad may save with CRLF, which you don't want. Notepad++ would be okay - but ee really is easy to use, and arguably you want to learn the basics of vi(m), only because it's available everywhere.
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Ok i'll have to look up a tutorial then on how to use vi or something similar because i do agree it might come in handy. But the situation stays the same for now because i've restarted, stopped & started the plugin a couple times now and i still don't have a new settings.json file. Any other ways to get it back? Or do i need to reinstall the plugin?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Are you taking snapshots? You could roll back to the last known good snapshot.
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Luckily Transmission made a snapshot itself on the 22nd of last month. So i'm gonna try that rollback function now and see what happens.

Edit: I tried stopping the plugin before doing the rollback, after i did the rollback i started it up again but still not reachable. Also no restored settings.json file. Guess i should just reinstall Transmission then?
 
Last edited:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
vi isn't too horrible after you're forced to use it because the alternative is ed a bunch of times.
After a year of torture, you can do fancy things like inserting new lines, exiting vi, replacing multiple characters or searching for regexes.
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Thanks for the help! I reinstalled the transmission plugin and used vi to edit the file. I looked at a tutorial on vi to see what to do. I couldn't for some reason remove/delete the number 5 so instead i just put a 1 in front of it so i now allow 15 instead of the planned 10.

Again thanks for all the help!
 
Top