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 | |
| exec 1>> /tmp/outfile 2>&1 | |
| # Based on http://docs.mongodb.org/ecosystem/platforms/amazon-ec2/ | |
| echo "[MongoDB] | |
| name=MongoDB Repository | |
| baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 | |
| gpgcheck=0 | |
| enabled=1" | tee -a /etc/yum.repos.d/mongodb.repo |
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 | |
| # Based on http://docs.mongodb.org/ecosystem/platforms/amazon-ec2/ | |
| echo "[MongoDB] | |
| name=MongoDB Repository | |
| baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 | |
| gpgcheck=0 | |
| enabled=1" | tee -a /etc/yum.repos.d/mongodb.repo |
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 | |
| # Inspired by http://stackoverflow.com/questions/7586995/read-variables-from-wp-config-php | |
| if [ $OPENSHIFT_APP_DNS = $OPENSHIFT_GEAR_DNS ]; then | |
| WPDBNAME=`cat ${OPENSHIFT_REPO_DIR}/php/wp-config.php | grep DB_NAME | cut -d \' -f 4` | |
| WPDBUSER=`cat ${OPENSHIFT_REPO_DIR}/php/wp-config.php | grep DB_USER | cut -d \' -f 4` | |
| WPDBPASSWORD=`cat ${OPENSHIFT_REPO_DIR}/php/wp-config.php | grep DB_PASSWORD | cut -d \' -f 4` | |
| WPDBHOST=`cat ${OPENSHIFT_REPO_DIR}/php/wp-config.php | grep DB_HOST | cut -d \' -f 4` |
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 | |
| # Inspired by http://stackoverflow.com/questions/7586995/read-variables-from-wp-config-php | |
| if [ $OPENSHIFT_APP_DNS = $OPENSHIFT_GEAR_DNS ]; then | |
| WPDBNAME=$OPENSHIFT_APP_NAME | |
| WPDBUSER=$OPENSHIFT_MYSQL_DB_USERNAME | |
| WPDBPASSWORD=$OPENSHIFT_MYSQL_DB_PASSWORD | |
| WPDBHOST=$OPENSHIFT_MYSQL_DB_HOST |
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 | |
| # Create the media folder if doesn't exists | |
| if [ ! -d ${OPENSHIFT_DATA_DIR}media ]; then | |
| mkdir ${OPENSHIFT_DATA_DIR}media | |
| fi | |
| # If the symlink to the media folder doesn't exist, create it | |
| if [ ! -L ${OPENSHIFT_DATA_DIR}media ]; then | |
| ln -s ${OPENSHIFT_DATA_DIR}media ${OPENSHIFT_REPO_DIR}php/ |
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 | |
| # mongos - Startup script for mongos | |
| # chkconfig: 35 85 15 | |
| # description: Mongo Router Process for sharding. | |
| # processname: mongos | |
| # config: /etc/mongos.conf | |
| # pidfile: /var/run/mongodb/mongos.pid |
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 | |
| source /etc/profile | |
| set -x | |
| CMD_SNAPSHOT_DESCRIBE=ec2-describe-snapshots | |
| CMD_SNAPSHOT_DELETE=ec2-delete-snapshot | |
| CMD_TAG_DESCRIBE=ec2-describe-tags | |
| CMD_TAG_CREATE=ec2-create-tags | |
| REGIONS="sa-east-1" |
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 -x | |
| export AWS_PATH=/opt/aws | |
| export PATH=$PATH:$AWS_PATH/bin | |
| # Prefer JDK if present | |
| if [ -d /usr/lib/jvm/java ]; then | |
| export JAVA_HOME=/usr/lib/jvm/java | |
| elif [ -d /usr/lib/jvm/jre ]; then | |
| export JAVA_HOME=/usr/lib/jvm/jre | |
| elif [ -d /usr/lib/jvm/java-7-openjdk-amd64/jre ]; 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 -ex | |
| for i in *; do | |
| ID=$(id -u $i) | |
| pushd $i | |
| mkdir app-root/logs | |
| chown $i.$i app-root/logs -R | |
| chmod 750 app-root/logs -R |
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
| Testado em Ubuntu 14.04 | |
| Adicionar os repositório de drivers | |
| $ add-apt-repository ppa:xorg-edgers/ppa -y | |
| $ apt-get update | |
| Buscar o driver recomendado para a placa de vídeo | |
| $ ubuntu-drivers devices |