This file contains hidden or 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 | |
MACHINE='dev' | |
if ! /Applications/VirtualBox.app/Contents/MacOS/VBoxManage list runningvms | grep $MACHINE >/dev/null ; then | |
docker-machine start $MACHINE | |
fi | |
if [ "$DOCKER_HOST"=="" ]; then | |
eval $(docker-machine env $MACHINE 2>/dev/null) |
This file contains hidden or 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
function current_branch() { | |
git branch|grep "\*"|awk '{print $2}' | |
} | |
function gpull() { | |
git pull origin $(current_branch) | |
} | |
function gpush() { | |
git push origin $(current_branch) |
This file contains hidden or 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
fluentd: | |
build: ./fluentd | |
links: | |
- "elasticsearch" | |
volumes: | |
- /var/lib/docker/containers:/var/lib/docker/containers | |
- /var/run:var/run | |
- /var/log/docker:/var/log/docker | |
elasticsearch: |
This file contains hidden or 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 ! /Applications/VirtualBox.app/Contents/MacOS/VBoxManage list runningvms | grep boot2docker-vm >/dev/null ; then | |
boot2docker start | |
fi | |
if [ "$DOCKER_HOST"=="" ]; then | |
eval $(boot2docker shellinit 2>/dev/null) | |
fi | |
/usr/local/bin/docker $@ |
This file contains hidden or 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 | |
IMG_PHP="tutum/apache-php:latest" | |
IMG_DB="mysql:latest" | |
CONT_DB="mysql_container" | |
CONT_PHP="php_container" | |
PASS_DB="clavedatabase" | |
DIR_SRC=$PWD"/src" | |
DB_DIR=$PWD"/data" | |
DB_NAME="database_name" |
This file contains hidden or 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 | |
service httpd stop | |
rm -rf /usr/local/apache/domlogs/*{offsetftpbytes,bytes_log,bkup} | |
rm -rf /usr/local/apache/domlogs/*.{es,com,net,org,pe,com.pe} | |
rm -rf /usr/local/apache/domlogs/ftp* | |
rm -rf /usr/local/apache/domlogs/*/* | |
service httpd start |
This file contains hidden or 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 | |
sudo rm -rf /opt/java/default && sudo ln -s $1 /opt/java/default | |
java -version |
This file contains hidden or 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 | |
echo "Iniciando" | |
if [ -z $1 ]; then | |
dir_search=/home/*/public_html | |
else | |
dir_search=$1 | |
fi | |
if [ -z $2 ]; then |
This file contains hidden or 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 | |
accounts=(usuario1 usuario2 usuario3) | |
for account in ${accounts[@]}; | |
do | |
su - ${account} -s /bin/bash -c "cd /home/${account}/public_html && unzip -q -o /tmp/Joomla_2.5.x_to_2.5.28-Stable-Patch_Package.zip"; | |
echo "account "${account}" updated" >> $HOME/report_update_joomla_2_5.csv; | |
done |
This file contains hidden or 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 [ -z $1 ]; | |
then | |
session=$(basename `pwd`) | |
else | |
session=$1 | |
fi | |
tmux has-session -t $session |