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 | |
# | |
######* Install and setup Docker ###### | |
if [ ! -f /usr/bin/docker ] || [ ! -f /usr/libexec/docker/cli-plugins/docker-compose ]; then | |
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; | |
do sudo apt-get remove $pkg; | |
done | |
# | |
# Add Docker's official GPG key: | |
sudo apt-get 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
EMAIL= | |
DOMAIN0= | |
DOMAIN1= | |
API_EMAIL= | |
API_TOKEN= |
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 | |
read -p "Question (y/N)? " answer | |
case ${answer:-n} in | |
y|Y ) | |
echo Yes | |
;; | |
n|* ) | |
echo No | |
;; |
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 | |
#* Vars | |
CONTROLLER=*controller* | |
USERNAME=RAID | |
STATUS=`sudo tw_cli info "$CONTROLLER" | grep "RAID"` | |
OK=`echo "$STATUS" | grep "OK"` | |
HOOK_URL=https://hooks.slack.com/services/****/****/**** | |
# | |
function slackNotify() { | |
curl -X POST -H 'Content-type: application/json' --data '{"username": "'$USERNAME'", "attachments": [{"color": "'$COLOR'", "text": "```'"$MESSAGE"'```"}]}' "$HOOK_URL" |
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 | |
#Sudo check | |
if (( $EUID != 0 )); then | |
echo -e "\nPlease run as root or use sudo\n" | |
exit | |
fi | |
# OS checks | |
arch=$(uname -s) |
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 | |
# | |
## | |
### Fix file pemissions | |
### dirs 755 files 644 | |
## | |
# | |
CWD="$(pwd)" |