Author Topic: Linux Internet Sharing  (Read 2692 times)

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Linux Internet Sharing
« on: September 22, 2007, 06:42:57 PM »
If you don't mind, I'll keep this thread for the blueprints about how to use Linux command-line scripts to set up FTP sharing.  

This is what I've got for now.

This pattern goes in a file called .netrc, with permissions set with chmod go-rwx, at home/username

Quote
machine  anyserver.anynet.net
login    username
password blahblah

These two Linux scripts, put in the sharing folder, retrieve and upload dbo files from and to the FTP server. This would work with the organisms cached by offline teleporters. I still don't know how to limit the amount of files uploaded and downloaded, besides setting a small size limit for the FTP account.

dbupload
Quote
#! /bin/sh
sudo ftp <<**
open anyserver.anynet.net
cd darwinbots
bin
mput *.dbo
bye
**
rm ./*.dbo

dbdownload
Quote
#! /bin/sh
sudo ftp <<**
open anyserver.anynet.net
cd darwinbots
bin
mget *.dbo
mdelete *.dbo
bye
**

Both them need to be made executable with chmod ugo+x. This would already work as "manual ftp sharing", if I didn't miss anything I should know about the ftp command.

Now, I would need to figure how to loop them.
« Last Edit: September 22, 2007, 06:50:27 PM by MacadamiaNuts »
Sometimes you win, and sometimes you lose...

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Linux Internet Sharing
« Reply #1 on: November 10, 2007, 07:10:36 PM »
Got it under wine!

I downloaded a native copy of wininet, ran wincfg and specified wininet to be run as native. (Also ran wine as root, just in case), and the sim is connected now.    
Sometimes you win, and sometimes you lose...