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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCUHHd6nFReUsxEaCj67lWWvmAFBPDAdGcC253y7W+ipbdf4+AVXi1K5e6zFVKKpLqKHP9r5QC6swXN4lCshRFKEaez0VX+ezLzqt2FclxURsFsxloJErH53mDarTVIwL8CAGN12Jhm8IM4+ulJ9qvtR4a8U0zmHHzlgf5C4t9XwPRaPVLxOGBLa87c9cmszx4abtns6Y4+YdHfd0GUQo/ql3fHUtQFhgz8K32kgxjoHFpso1FeGVNtbPbw8ScxP+PcUPAYwmRqpZ1P6nNmhhh7/SnBXtJJxHPu6HgcV/jhdlE/hX/wekpPrYSfJ4olw9Znuacal5awbodeu35En9IK3N2LjgXDsiMIejBMIcwGBbuic5Kke41+ohWySjB0NiqfeRgphZOuxw9DLRXilhXiqH8LK71Slvs/pH+eWj/BvDyEezsVEDxTikNJaYU6lXITUQuM7QPrAm+sAoct/D/tcMVVqYdfZTRDrQF7bv7VOwLeVjLYIj+og9A20FVhaaU= kenny.rasschaert |
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 [[ "$EUID" -ne 0 ]]; then | |
echo "ERROR: Please run this script as root." >&2 | |
exit 1 | |
fi | |
export DEBIAN_FRONTEND=noninteractive | |
export DEBCONF_NONINTERACTIVE_SEEN=true | |
# Get latest metadata from mirrors. |
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 | |
# This script wraps around ssmtp. It makes a bit easier for me to send emails from cron. | |
# How to use this script: | |
# send-email.sh --subject="hello world" --body_file="/path/to/file.txt" --email="[email protected]" | |
# Set PATH | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
function fail() { |
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 PATH | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Run the certbot container to renew the certs | |
docker-compose -f /opt/docker/certbot/docker-compose.yml run --rm certbot | |
# Concatenate the resulting certificate chain and the private key and write it to HAProxy's certificate file. | |
cat /opt/docker/certbot/certbot/etc/letsencrypt/live/example.org/{fullchain,privkey}.pem > /opt/docker/haproxy/ssl/example_org.pem |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC19TqKl998IFqVt6RP4mTsVTX0qP95yBUnbX1/Cfm33YgPulRyju3Q0tfajTi47yvKgTgniLoFpev4YySGiXBZ0NECCLITISoarakcqITBiY73R+F+aaw0mHx6FM9mQSAvqmEP/Vvg6UGiSUMDKxfKZPhzlbzaJO0ch00RyVgfW8CfHkL0PeUA2qFFb24nvcnqmhNeVGer0ze/NsndnvztgOp01ql6PnEES4589AgQ7y3AgwOIHz8YGr+EdAQzSsglt3cxco1wj8k7JRB+I6uIb3pcV0Y8R6kTYqdJD7QmkqOMzWZNsy+rHBzLrudZ1Wu/7eP8JBbMuVVs+5i8gU93 kenny 20180423 |
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
# If you have a healthcheck defined in your Dockerfile | |
# | |
# HEALTHCHECK --interval=5s --timeout=4s --start-period=10s CMD-SHELL pg_isready -U postgres -t 0 || exit 1 | |
# | |
# or in your docker-compose.yml | |
# | |
# healthcheck: | |
# test: ["CMD-SHELL", "pg_isready -U postgres -t 0 || exit 1"] | |
# timeout: 4s | |
# interval: 5s |
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 | |
command="curl -s $1 2>/dev/null" | |
prev_output=$(eval "$command") | |
echo "$prev_output" | |
while :; do | |
curr_output=$(eval "$command") | |
curr_wc=$(echo "$curr_output" | wc -l) | |
prev_wc=$(echo "$prev_output" | wc -l) | |
wc_diff=$((curr_wc - prev_wc)) |
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 [[ -z $1 ]]; then | |
echo "Usage: $(basename $0) HOSTNAME" >&2 | |
exit 1 | |
fi | |
ssh-copy-id $@ | |
ssh-copy-rsub $@ |
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 [[ -z $1 ]]; then | |
echo "Usage: $(basename $0) start|stop" >&2 | |
exit 1 | |
fi | |
if [[ $1 == "start" ]]; then | |
echo "starting container" | |
docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock --name dockerui dockerui/dockerui | |
echo "dockerui is now listening on localhost:9000" |
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 | |
bootstrapper_dialog() { | |
DIALOG_RESULT=$(dialog --clear --stdout --backtitle "Arch bootstrapper" --no-shadow "$@" 2>/dev/null) | |
} | |
################# | |
#### Welcome #### | |
################# | |
bootstrapper_dialog --title "Welcome" --msgbox "Welcome to Kenny's Arch Linux bootstrapper.\n" 6 60 |
NewerOlder