This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne 2 ]; then | |
echo "Parameters:" | |
echo "1- Host (irvwebxlx01)" | |
echo "2- IP (10.50.7.201)" | |
exit 1 | |
fi | |
_host=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Download Artifact and Extract | |
_CLUSTER=$1 | |
BUILD_VERSION=$2 | |
BUILD_ENV="$3" | |
_DROPFOLDER="/data/edgex/builds/" | |
_FILENAME="${BUILD_VERSION}.zip" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--------------------------- | |
# Confugure SSH | |
#--------------------------- | |
apt-get install openssh-server -y | |
sed -i "s/Port .*/Port 6660/g" /etc/ssh/sshd_config | |
service ssh restart | |
#--------------------------- | |
# Configure Firewall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--------------------------- | |
# Build Redis from Source | |
#--------------------------- | |
echo "[-] Install Redis Requirements" | |
apt-get install -y build-essential tcl8.5 | |
echo "[-] Install Redis Server" | |
echo " Download Source" | |
wget http://download.redis.io/releases/redis-2.8.9.tar.gz | |
tar xzf redis-2.8.9.tar.gz | |
rm !!:2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# REF: https://github.com/creationix/nvm | |
git clone https://github.com/creationix/nvm.git ~/.nvm | |
apt-get install -y openssl libssl-dev | |
echo ". ~/.nvm/nvm.sh" >> ~/.bashrc | |
. ~/.nvm/nvm.sh | |
nvm ls-remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir MailX | |
cd MailX | |
#Download file | |
wget http://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5.orig.tar.gz | |
#Download patch | |
wget http://www.linuxfromscratch.org/patches/blfs/svn/heirloom-mailx-12.5-fixes-1.patch | |
#unZip | |
tar -xvzf heirloom-mailx_12.5.orig.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2014 Google Inc. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOCAL_REGISTRY_NAME=local-docker-registry | |
GCS_BUCKET=some-bucket | |
CONFIG_DIR=$HOME/.config | |
LOCAL_REGISTRY_ID=`docker ps -q $LOCAL_REGISTRY_NAME` | |
if [ ! -z "$LOCAL_REGISTRY_ID" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Copyright 2014 Google Inc. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
/usr/share/fk-3p-kafka/bin/kafka-topics.sh $ZOOKEEPER --describe --topic $1 \ | |
| grep Leader \ | |
| awk '{print $4,$8}' | sed 's/,/ /' \ | |
| awk '{ | |
for(i=1;i<7;++i){a[i]=0}; | |
sum[$2]++; sum[$3]++; | |
a[$2]=1; a[$3]=1; | |
printf "%3d ",$1; | |
for (i=1;i<7;++i) {printf "%3d ",a[i]}; printf "\n"; |
OlderNewer