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 | |
echo =============== | |
echo Open port 80 for verification ... | |
echo =============== | |
you cufw allow 80/tcp && ufw reload | |
echo | |
echo ============== | |
echo Certififcate refresh / renew |
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
# make a full restore shell script for the current nvram settings | |
FILE=$HOSTNAME-restore-sh | |
nvram show | grep = | grep -v -e =$ | awk -F'=' '{print $1}' | sort -f | (IFS=''; while read VAR; do VAL=$(nvram get ${VAR}); [ -n "$VAL" ] && printf 'nvram set %s='\''%s'\''\n' ${VAR} ${VAL/\'/\'\\\'\'}; done) > $FILE | |
nvram save >> $FILE | |
nvram commit >> $FILE | |
# insert an scp statement, etc, to copy the content to a storage location. |