Remote File Modifier / FTP
Thursday, August 13, 2009 21:48I read somewhere once that for ideas you should look to what monotonous tasks you can automate, which is how this idea started to formulate. A co-worker, Bill, and I are putting in multiple trixbox based phone systems and are coming across allot of tweaks as we go that need to be pushed across multiple servers. By the time this idea becomes a reality we may be done or I back to school. However, through doing something like this it will allow me to learn new skills and get a better understanding of other concepts, such as how to communicate with through my program over a network/internet that I can apply to future programs. While he and I were talking Bill mentioned how it would be nice if there was a program that could do something along the following:
- read the server ip address, remote file location, file name, line number (where data is to be inserted after, since all same, make it first entry in file) to be accessed from a file (for multiple servers, so say, 1 per line)
- if just one server allow above information to be entered in program (NOT read from file)
- search and replace
- make the change and copy the file back to the server
- save a local copy with the server name/IP (some sort of identification) & timestamp in the file name, allows you to roll back to previous version
- option to insert a single line, overwrite file, replace line
Future enhancements:
- make program a full FTP app
- text editor capability
Bill says:
November 11th, 2009 at 12:41 AM
Rather than ftp, use scp or rsyc or something, so it can be copied anywhere on the destinaion server, not just to the ftp folder….
Hows this going anyways?
Devin says:
November 11th, 2009 at 10:21 AM
Well, since I am in school, I don’t have much time for working on personal projects, so not all that well at the present moment in time, lol. One of the bigger challenges, for me, on this projeect will be learning how to actually implement scp or rsync to actually connect and transfer files between the server and client. But that is the whole point of projects anyways, just need the key word time, which won’t come until I am on a break from school sometime, most likely, and unfortunately as I typicall have a big itch to work on my personal projects sometiems.