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/sh | |
BASEFOLDER=/home/vbox/backups | |
for VMNAME in $(VBoxManage list runningvms | cut -d ' ' -f1 | sed 's/"//g;') | |
do | |
echo "" | |
VBoxManage controlvm "$VMNAME" acpipowerbutton | |
echo "Waiting for VM "$VMNAME" to poweroff..." | |
until $(VBoxManage showvminfo --machinereadable "$VMNAME" | grep -q ^VMState=.poweroff.) |
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
#### | |
# Install magneticod go-rewrite on a brand new scaleway ubuntu 16.04 instance | |
#### | |
apt-get update && apt-get -y upgrade | |
apt-get install -y software-properties-common python-software-properties git trickle | |
add-apt-repository ppa:gophers/archive | |
apt update | |
apt-get -y install golang-1.9-go | |
mkdir -p $HOME/go/src | |
cd $HOME/go/src |
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
apt-get update | |
apt-get -y upgrade | |
apt install -y linux-headers-$(uname -r) build-essential dkms curl | |
tmpmount=/tmp/iso | |
vboxversion=$(curl -s -L https://download.virtualbox.org/virtualbox/LATEST-STABLE.TXT) | |
echo fetching $vboxversion | |
mkdir -p ${tmpmount} | |
vboxisourl="https://download.virtualbox.org/virtualbox/${vboxversion}/VBoxGuestAdditions_${vboxversion}.iso" | |
isoname="/tmp/VBoxGuestAdditions_${vboxversion}.iso" |
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 | |
set -e | |
GVERSION="1.10.3" | |
GFILE="go$GVERSION.linux-amd64.tar.gz" | |
GOPATH="$HOME/go" | |
GOROOT="/usr/local/go" | |
TMPDIR=/tmp |
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
apt-get update | |
apt-get -y upgrade | |
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
apt-get install apt-transport-https | |
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-6.x.list | |
add-apt-repository ppa:webupd8team/java | |
apt-get install -y elasticsearch oracle-java9-installer | |
apt-get install -y oracle-java9-set-default | |
systemctl daemon-reload | |
systemctl enable elasticsearch.service |
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
(zcat $(ls -tr /var/log/apt/history.log*.gz); cat /var/log/apt/history.log) 2>/dev/null | | |
egrep '^(Start-Date:|Commandline:)' | | |
grep -v aptdaemon | | |
egrep '^Commandline:' |
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
echo testing | |
pause |
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
# =================== YOUR DATA ======================== | |
SERVER_NAME="some-server-name" | |
SERVER_IP="111.111.11.11" | |
USER="someuser" | |
SUDO_PASSWORD="secret-password-one" | |
MYSQL_ROOT_PASSWORD="secret-password-two" |
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
# =================== YOUR DATA ======================== | |
SERVER_NAME="some-server-name" | |
SERVER_IP="111.111.11.11" | |
USER="someuser" | |
SUDO_PASSWORD="secret-password-one" | |
MYSQL_ROOT_PASSWORD="secret-password-two" |
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/sh | |
apt-get update && apt-get upgrade | |
systemctl stop apache2 | |
apt-get remove --purge apache2 | |
apt-get install -y nginx | |
systemctl start nginx | |
systemctl enable nginx | |
systemctl status nginx | |
apt-get install -y php-fpm php-mysql | |
apt-get install -y mysql-server |