From b528568876c337182aa188fb5141895b7859a5e2 Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Wed, 6 Sep 2023 17:50:43 +0000 Subject: [PATCH] install to use pip certbot, instead of apt. migrating to discord using block style. --- crons/backup-log.sh | 4 ++-- crons/storage-alert.sh | 4 ++-- crons/storage-log.sh | 2 +- one-time-stuff/install-software.sh | 17 ++++++++++++++++- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/crons/backup-log.sh b/crons/backup-log.sh index e74481f..c7c3408 100755 --- a/crons/backup-log.sh +++ b/crons/backup-log.sh @@ -8,9 +8,9 @@ cd "${BACKUP_DIRECTORY}" backups=`find * -type f | sort | xargs du -h` echo "${backups}" -${LOCATION}/../discord.sh general "${backups}" +${LOCATION}/../discord.sh block "${backups}" hashes=`find * -type f | sort | xargs md5sum --tag` echo "${hashes}" -${LOCATION}/../discord.sh general "${hashes}" +${LOCATION}/../discord.sh block "${hashes}" diff --git a/crons/storage-alert.sh b/crons/storage-alert.sh index 9d559de..c7204aa 100755 --- a/crons/storage-alert.sh +++ b/crons/storage-alert.sh @@ -11,11 +11,11 @@ for index in "${!STORAGE_ALERT[@]}"; do if [[ "0" != "${alert}" ]]; then echo "${storage} is below threshold ${STORAGE_ALERT[$index]}G" - ${LOCATION}/../discord-if-distinct.sh storage "storage-${COUNT}" "${storage} is below threshold ${STORAGE_ALERT[$index]}G" + ${LOCATION}/../discord-if-distinct.sh block "storage-${COUNT}" "${storage} is below threshold ${STORAGE_ALERT[$index]}G" else echo "${storage} is above threshold ${STORAGE_ALERT[$index]}G" - ${LOCATION}/../discord-if-distinct.sh storage "storage-${COUNT}" "${storage} is above threshold ${STORAGE_ALERT[$index]}G" + ${LOCATION}/../discord-if-distinct.sh block "storage-${COUNT}" "${storage} is above threshold ${STORAGE_ALERT[$index]}G" fi let "COUNT++" diff --git a/crons/storage-log.sh b/crons/storage-log.sh index 1af4c08..d08de18 100755 --- a/crons/storage-log.sh +++ b/crons/storage-log.sh @@ -7,5 +7,5 @@ source "${LOCATION}/../config.sh" storage=`${LOCATION}/../df-custom.sh ${STORAGE_MONITOR[@]}` echo "${storage}" -${LOCATION}/../discord.sh storage "${storage}" +${LOCATION}/../discord.sh block "${storage}" diff --git a/one-time-stuff/install-software.sh b/one-time-stuff/install-software.sh index db0b4b2..d7016fd 100755 --- a/one-time-stuff/install-software.sh +++ b/one-time-stuff/install-software.sh @@ -59,7 +59,22 @@ echo "----- Install extra utilities: ncdu, zip, iftop -----" install_collection 'extra utilities' ncdu zip unzip iftop colorized-logs php-cli ca-certificates curl gnupg lsb-release echo "----- Install nginx + certbot -----------------------" -install_collection 'nginx, certbot' nginx certbot python3-certbot-nginx +read -p 'Install nginx, and python3-pip, then install via pip certbot, certbot-nginx, and certbot-dns-google-domain? [y/N]: ' nginx_install +case $nginx_install in + [Yy]* ) + if [ $called_update = false ]; then + echo "Updating APT before Installing" + sudo apt update + called_update=true + fi + echo "Installing nginx python3-pip" + sudo apt install nginx python3-pip -y + sudo pip install certbot certbot-nginx certbot-dns-google-domains + ;; + * ) + echo 'Skipping' + ;; +esac echo "----- Add nginx logging conf ------------------------" read -p 'Install the "tabbed_detailed" nginx log format? [y/N]: ' nginx_log