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
install_docker () { | |
distro=$(cat /etc/*-release | grep DISTRIB_ID | awk -F '=' '{print $2}' | awk '{print tolower($0)}') | |
distroList=("debian" "ubuntu") | |
if [[ -n "${distro}" ]]; then | |
if [[ " ${distroList[*]} " =~ " ${distro} " ]]; then | |
echo "Installing kubernetes on $distro" | |
else | |
echo "Upsupported system distro: ${distro}" | |
echo "<distro> must be one of: ${distroList[*]}" |
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
################### | |
# settings | |
backup_dir=<path to the backup directory> # e.g. /root/backup | |
remote_server=<example.com> # ip address or server name set in ssh config, same as using the ssh or scp | |
server_name=<server_name> # a tag for the log purpose and will be the backup folder name | |
################### | |
startTime=$(date +%s) | |
# define color |