Bitcoin Forum
June 15, 2024, 03:07:11 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need a bash script  (Read 962 times)
slackers (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 0



View Profile
May 31, 2013, 10:45:04 PM
 #1

Hey guys i need someone to write me a bash script.

What it needs to do:

- install gcc if it doesnt exist
- Download and compile nginx
- Set nginx up as a reverse proxy
- If all went well send a get request to my server like site.com/wasuccess.php?ip=servers_ip

Should work on centos/debian/bsd/solaris/busybox(if its easy)

Pay via bitcoin

reptable members only or we use escrow
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
June 01, 2013, 09:00:23 AM
 #2

Not to mention that source installs on a distro with a package manager is a recipe for disaster

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
slackers (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 0



View Profile
June 01, 2013, 01:15:12 PM
 #3

You can do it via package manager if you wish
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
June 01, 2013, 07:48:21 PM
 #4

If it would be so trivial/easy then devs would only release a one-fits-all version that install on every Unix/Linux/BSD/Windows. There are too many differences between the distros.

On RHEL/Centos you'll first need to add EPEL and then use yum. On Debian systems you could use apt-get. BSD/Solaris/Busybox are different too.

Additionally, you need to configure the distro to start nginx after boot automatically and while you're at it, let TCP traffic through the firewall too.

Calling home is easy with curl (for which you need to check too and install it if it's missing (what I said about installing nginx applies here too)). You would not need a server_ip parameter (which you would need to get in different ways on the distros) since your server logs the requesting IP.

The nginx config isn't the big problem; iirc it's something along those lines:
Code:
server {
    listen 80;
    location / {
        proxy_pass http://your.server.ip:80;
    }
}

Last but not least: You're assuming that each of them runs bash.

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
slackers (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 0



View Profile
June 02, 2013, 10:40:05 PM
 #5

If it would be so trivial/easy then devs would only release a one-fits-all version that install on every Unix/Linux/BSD/Windows. There are too many differences between the distros.

On RHEL/Centos you'll first need to add EPEL and then use yum. On Debian systems you could use apt-get. BSD/Solaris/Busybox are different too.

Additionally, you need to configure the distro to start nginx after boot automatically and while you're at it, let TCP traffic through the firewall too.

Calling home is easy with curl (for which you need to check too and install it if it's missing (what I said about installing nginx applies here too)). You would not need a server_ip parameter (which you would need to get in different ways on the distros) since your server logs the requesting IP.

The nginx config isn't the big problem; iirc it's something along those lines:
Code:
server {
    listen 80;
    location / {
        proxy_pass http://your.server.ip:80;
    }
}

Last but not least: You're assuming that each of them runs bash.

Most of them problems can be solved.

Still looking for a coder, name your price.
Mad7Scientist
Sr. Member
****
Offline Offline

Activity: 373
Merit: 262


View Profile
June 03, 2013, 04:52:51 PM
 #6

Since you can't be sure that a C compiler is installed, what if the entire program including the reverse proxy were to be done in something like perl or python? I think most systems have perl installed.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!