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 | |
# Set all Variables | |
HOSTNAME='tinkerbell.hill.local' | |
USERNAME='chill' | |
INTERFACE_NAME='enp1s0' | |
HOST_IP='192.168.161.1' | |
HOST_MASK='24' | |
DEFAULT_ROUTE='192.168.161.254' | |
DNS_SERVERS='[192.168.161.254,8.8.8.8]' | |
TINK_LB_IP="192.168.161.2" |
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 | |
rsync_source="198.51.60.10:/mnt/tank/dataset/" | |
rsync_dest="/mnt/tank/dataset/" | |
slack_token="UYHJ5E74J/B03QSDR6598/8pW72Fl5OOUoFlj53sIccOi6" | |
get_space="df | grep `echo ${rsync_dest::-1}` | awk '{print \$3}'" | |
export BLOCKSIZE=1024 | |
while true; do | |
before_space=`eval "$get_space"` | |
time_passed=`{ time rsync -aAHX $rsync_source $rsync_dest; } 2>&1 | grep real | awk '{print $2}'` | |
after_space=`eval "$get_space"` |
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
def is_number_input(user_input): | |
if not user_input.isnumeric(): | |
print("You must input a whole number!") | |
return 0 | |
user_input = int(user_input) | |
if user_input > 35: | |
print("Your number must be smaller than 35!") | |
return 0 | |
elif user_input < 2: | |
print("Your number must be larger than 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 | |
# Become the root user because I didn't verifiy sudo for every command. | |
# Install Tinkerbell | |
sudo apt-get update -y | |
sudo apt-get install -y apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ |