-
-
Save hukl/1be32945b6b744613b449d436100f57d to your computer and use it in GitHub Desktop.
etcupdate script
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/sh | |
JAIL_DIR="/usr/jails/" | |
# Loop through each subdirectory in JAIL_DIR | |
for jail_sub_dir in "$JAIL_DIR"*.lan/; do | |
# Check if the directory exists | |
if [ -d "$jail_sub_dir" ]; then | |
# Run etcupdate commands with the current subdirectory | |
echo "Updating: $jail_sub_dir" | |
etcupdate -D "$jail_sub_dir" | |
etcupdate resolve -D "$jail_sub_dir" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment