- Note the available block devices
$ lsblk -o name,size,fstype,label
NAME SIZE FSTYPE LABEL
nvme1n1 465.8G
├─nvme1n1p1 1G vfat LINUX
└─nvme1n1p2 464.8G
$ lsblk -o name,size,fstype,label
NAME SIZE FSTYPE LABEL
nvme1n1 465.8G
├─nvme1n1p1 1G vfat LINUX
└─nvme1n1p2 464.8G
| #!/bin/bash | |
| # Try to get IPv4 address and mask from tun0 | |
| tun_info=$(ip -4 addr show tun0 2>/dev/null | grep -oP 'inet \K[\d.]+/\d+') | |
| # Try to get IPv4 address and mask from eth0 if tun0 fails | |
| eth_info=$(ip -4 addr show eth0 2>/dev/null | grep -oP 'inet \K[\d.]+/\d+') | |
| # Decide which to display | |
| if [[ -n "$tun_info" ]]; then |
| #!/bin/bash | |
| # From commit to running globally within a minute! | |
| # 1. Build & upload your image | |
| # 2. Configure environment variables and more | |
| # 3. `deploy.sh` takes care of the rest! | |
| # Ensure script receives an argument for container name | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <container_name>" | |
| exit 1 |