Author

Topic: Need a bash script (Read 979 times)

sr. member
Activity: 373
Merit: 262
June 03, 2013, 11:52:51 AM
#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.
newbie
Activity: 18
Merit: 0
June 02, 2013, 05: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.
hero member
Activity: 576
Merit: 514
June 01, 2013, 02: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.
newbie
Activity: 18
Merit: 0
June 01, 2013, 08:15:12 AM
#3
You can do it via package manager if you wish
hero member
Activity: 576
Merit: 514
June 01, 2013, 04:00:23 AM
#2
Not to mention that source installs on a distro with a package manager is a recipe for disaster
newbie
Activity: 18
Merit: 0
May 31, 2013, 05: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
Jump to: