Skip to content

Instantly share code, notes, and snippets.

View richardsonlima's full-sized avatar
:octocat:
Focusing

Richardson Lima richardsonlima

:octocat:
Focusing
View GitHub Profile
#!/bin/env bash
# Created by Richardson Lima - contatorichardsonlima at gmail dot com
# set -x
Nat='' # NAT IP
Timeout='15' # Seconds
File='./EnvFile.txt'
User='' # Username for ssh connection
function CreateEnvFile(){
@richardsonlima
richardsonlima / LinuxCollector.sh
Last active March 11, 2016 15:10
LinuxCollector.sh
#!/bin/bash
# Program information
name="LinuxCollector"
version="3.0.0"
releasedate="25 November 2015"
author="Richardson Lima, "
author_contact="contato@richardsonlima.com.br"
website="http://www.richardsonlima.com.br"
copyright="Copyright 2014-2015 - ${author}, ${website}"
#!/bin/sh
#
# AdministradorBackupPG.sh
# Autor : Aecio Paes Barreto <aecio.junior@centralit.com.br>
# Descricao : Backup PostgreSQL.
# Observacao : Nenhuma.
#
# Versao 1 : Criado o script, 15 de outubro de 2015.
#
# Versao 2 : <aecio.junior@centralit.com.br>, 27 de outubro 2015.
#!/bin/sh
#
# GerenciamentoDRM.sh
#
# Autor: Aecio Paes Barreto <aeciojr@gmail.com> 13 de marco de 2014.
#
# Descrição: Gerenciamento de DRM/TSM Server.
#
# Obs..: Nenhuma.
#
tail -n 1000 -f /path/File.log|awk '/INFO/ {print "\033[32m" $0 "\033[39m"} /ERROR/ {print "\033[31m" $0 "\033[39m"} /WARNING/ {print "\033[33m" $0 "\033[39m"}'
Esta cofiguração permite acessar tunel vpn estabelecido no linux à partir duma VM Windows com interface bridge.
########## NO LINUX ##########
# backup do sysctl.conf
cp -Rfa /etc/sysctl.conf{,.ori}
# habilitando ip forward no sysctl.conf
sed -i 's/.*net.ipv4.ip_forward.*/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
for user in $(cat ./accounts.txt);do echo -e '\033[0;36m [+] Efetuando migração do usuario: \033[m' $user && imapsync --timeout 0 --addheader --syncinternaldates --buffersize 81920000 --host1 IP-SERVER-ORIGEM --user1 $user+DovecotSuperUser --password1 'PASSWORD' --authmech1 PLAIN --sep1 "/" --prefix1 "" --syncinternaldates --host2 localhost --port2 7143 --user2 $user@DOMAIN --password2 'PASSWORD' --authmech2 PLAIN --subscribed \
--folder "^INBOX$" \
--folder "FOLDERNAME-1" \
--folder "FOLDERNAME-2" \
--allowsizemismatch --useheader Message-ID ; done
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- services