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 | |
host_to_ping="10.20.4.201" | |
services_to_restart=("amazon-ssm-agent") | |
# Check network status before starting the loop | |
if ping -c 1 -W 1 $host_to_ping > /dev/null; then | |
echo "Network is up. Script is running in monitoring mode." | |
else | |
echo "Network is down. Restarting services..." |
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
# First get the keys for External Account Binding | |
gcloud publicca external-account-keys create | |
# Obtaining a certificate | |
AWS_HOSTED_ZONE_ID=Z01255342XLTM363R5MP8 lego \ | |
--server 'https://dv.acme-v02.api.pki.goog/directory' \ | |
-m '[email protected]' \ | |
-d '*.example.com' \ | |
--eab --kid 'xxxxxxx' \ | |
--hmac 'xxxxxxx' \ |
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
dnf install -y \ | |
https://download.docker.com/linux/fedora/38/aarch64/stable/Packages/docker-ce-cli-24.0.5-1.fc38.aarch64.rpm \ | |
https://download.docker.com/linux/fedora/38/aarch64/stable/Packages/containerd.io-1.6.22-3.1.fc38.aarch64.rpm \ | |
https://download.docker.com/linux/fedora/38/aarch64/stable/Packages/docker-ce-24.0.5-1.fc38.aarch64.rpm \ | |
https://download.docker.com/linux/fedora/38/aarch64/stable/Packages/docker-ce-rootless-extras-24.0.5-1.fc38.aarch64.rpm \ | |
https://download.docker.com/linux/fedora/38/aarch64/stable/Packages/docker-buildx-plugin-0.11.2-1.fc38.aarch64.rpm \ | |
https://download.docker.com/linux/fedora/38/aarch64/stable/Packages/docker-compose-plugin-2.20.2-1.fc38.aarch64.rpm \ | |
https://kojipkgs.fedoraproject.org//packages/fuse-overlayfs/1.12/1.fc38/aarch64/fuse-overlayfs-1.12-1.fc38.aarch64.rpm \ | |
https://dl.fedoraproject.org/pub/fedora/linux/releases/38/Everything/aarch64/os/Packages/f/fuse3-libs-3.13.1-2.fc38.aarch64.rpm \ | |
https://kojipkgs.fedoraproject.org//packages/slirp4ne |
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 | |
function cleanup() { | |
FILES=("$@") | |
for FILE in "${FILES[@]}"; do | |
if [[ -f "$FILE" ]]; then | |
echo "Deleting $FILE"; | |
sudo shred -zuf $FILE; | |
fi; | |
if [[ -f $FILE ]]; then |