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/sh | |
# MySQL listen on all interfaces | |
echo "Configuring MySQL..." | |
mysql -uroot -punsafepassword <<EOFMYSQL | |
CREATE USER 'remoteuser'@'localhost' IDENTIFIED BY 'passwd123'; | |
GRANT ALL PRIVILEGES ON *.* TO 'remoteuser'@'localhost' WITH GRANT OPTION; | |
CREATE USER 'remoteuser'@'%' IDENTIFIED BY 'passwd123'; | |
GRANT ALL PRIVILEGES ON *.* TO 'remoteuser'@'%' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; |
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
#!/usr/bin/php | |
<?php | |
/* | |
* This script can be passed to --learn-address of the openvpn server, it will | |
* update the local bind9 server whenever an ip address is passed | |
*/ | |
// Bind9 server to update | |
define("NS_ADDR", "127.0.0.1"); | |
// Domain to prepend common name to | |
define("DOMAIN", "vpn."); |
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/sh | |
# Get libxl library | |
echo "Downloading and extracting libxl 3.5.4 for linux..." | |
cd /tmp | |
wget -q -O libxl-lin-3.5.4.tar.gz ftp://xlware.com/libxl-lin-3.5.4.tar.gz | |
tar -xf libxl-lin-3.5.4.tar.gz | |
cd libxl-3.5.4.1/ | |
cp lib/libxl.so /usr/lib/libxl.so | |
cp -r include_c/ /usr/include/libxl_c |
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/sh | |
# Get gearman client and server library | |
cd /tmp | |
# apt-get Dependancies | |
echo "Installing dependencies..." | |
apt-get build-dep -q=2 libgearman6 | |
apt-get install -q=2 gperf | |
echo "Downloading gearmand source from Launchpad..." | |
wget -q -O gearmand-1.1.12.tar.gz https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz | |
tar -xf gearmand-1.1.12.tar.gz |
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/sh | |
echo "Installing php5 build dependencies..." | |
apt-get build-dep -q=2 php5 | |
cd /tmp | |
# Get PHP | |
echo "Downloading and extracting php5.5.9 source..." | |
wget -q -O php5.5.9.tar.xz http://us2.php.net/get/php-5.5.9.tar.xz/from/this/mirror | |
tar xf php5.5.9.tar.xz | |
cd php-5.5.9/ | |
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
# Update apt | |
echo "Update apt..." | |
apt-get -q=2 update | |
# Add official nginx source | |
apt-get install -q=2 python-software-properties | |
echo "Installing official Nginx source..." | |
nginx=stable | |
add-apt-repository -y ppa:nginx/$nginx | |
apt-get -q=2 update |
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/sh | |
# Update apt | |
echo "Update apt..." | |
apt-get -q=2 update | |
# Stop interaction | |
echo mysql-server mysql-server/root_password password unsafepassword | debconf-set-selections | |
echo mysql-server mysql-server/root_password_again password unsafepassword | debconf-set-selections | |
# Download and install |
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
<?php | |
date_default_timezone_set('Africa/Johannesburg'); | |
/** | |
* Get this library here https://github.com/geerlingguy/Ping | |
*/ | |
require_once __DIR__ .'/Ping/JJG/Ping.php'; | |
$lock = __DIR__ ."/.lock"; |
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/sh | |
# @see https://stackoverflow.com/questions/10956668/run-a-shell-command-when-a-file-is-added | |
tail -n 0 -F /var/log/vsftpd.log | while read line; do | |
if echo "$line" | grep -q 'OK UPLOAD:'; then | |
filename=$(echo "$line" | cut -d, -f2) | |
#if [ -s "/srv/$filename" ]; then | |
echo "Got: $filename" | |
#fi | |
fi | |
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
#!/usr/bin/env bash | |
images=$(echo $IMAGES | tr " " "\n") | |
for image in $images | |
do | |
IFS=':' read -ra imageSplit <<< "$image" | |
IMGNAME=${imageSplit[0]} | |
IMGTAG=${imageSplit[1]} | |
PROJECT="$(basename $IMGNAME)" |