Skip to content

Instantly share code, notes, and snippets.

View filipepgoes's full-sized avatar

Filipe Goes filipepgoes

  • Brasília, DF, Brazil
View GitHub Profile
#!/bin/sh
set -u
usage()
{
echo "usage: <command> options: [-t] -i <ip interno da máquina monitoradora> -e <ip externo da máquina monitorada>"
}
while getopts ti:e: OPCAO; do
case "${OPCAO}" in
t) modo_teste=1 ;;
i) ipintradora="${OPTARG}" ;;
#!/bin/sh
set -u
yum -y update
yum -y install git openssl-devel
mkdir ./downloads
cd ./downloads
wget http://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
tar xzf nagios-plugins-2.2.1.tar.gz
cd nagios-plugins-2.2.1
netsh winhttp import proxy source=ie
# Current WinHTTP proxy settings:
# Proxy Server(s) : 192.168.1.1:80
# Bypass List : (none)
$webclient=New-Object System.Net.WebClient
$creds=Get-Credential
$webclient.Proxy.Credentials=$creds
@filipepgoes
filipepgoes / change-ports.sh
Created September 2, 2016 17:09
Script to change Ubuntu ports
#!/bin/bash
PRIVATE_PORT=8080
PUBLIC_PORT=80
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root."
exit 1
fi
@filipepgoes
filipepgoes / java-install.sh
Last active February 23, 2018 15:29
Script to install Java in Ubuntu 14 and CentOS 7
#!/bin/bash
# Installing JAVA
# Authored by Filipe Goes
# Tested in Ubuntu Server 14.05
# Tested in CentOS 7.3
set -u
usage()
{
echo "usage: java-install-sh -u 'JDK download URL' -f 'Foldername to install (ex. jdk1.8.0_121).'"
@filipepgoes
filipepgoes / wildfly-install.sh
Last active February 15, 2017 19:18 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#original author :Dmitriy Sukharev
#date :2016-06-18T02:45-0700
#usage :/bin/bash wildfly-install.sh
#tested-version1 :10.0.0.CR3
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22
#tested-version2 :10.0.0.Final