Add euo to scripts

This commit is contained in:
Antonio J. Delgado 2023-11-02 17:26:19 +02:00
parent 8c47dffb01
commit 358d7ef176
5 changed files with 7 additions and 4 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash
set -euo pipefail
FILTER_PATH='/var/spool/filter'
while read -r FOLDER
do
tar cjf "${FOLDER}.tar.bz2" "${FOLDER}" &> /dev/null && rm -rf "${FOLDER}"
done <<< "$(find "${FILTER_PATH}/" -maxdepth 1 -type d -regex "^${FILTER_PATH}/2[0-9]*$")"
done <<< "$(find "${FILTER_PATH}/" -maxdepth 1 -type d -regex "^${FILTER_PATH}/2[0-9]*$")"

View file

@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail
# http://www.postfix.org/FILTER_README.html
# Clean up when done or when aborting.
finished=false

View file

@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail
# shellcheck disable=SC1091
[ -r /var/lib/from_repos/ad_scripts/shared_functions.sh ] && . /var/lib/from_repos/ad_scripts/shared_functions.sh

View file

@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail
if [[ "$1" == "" ]]
then
echo "Indicate a string to search in the postqueue."
@ -8,4 +9,4 @@ postqueue -p | grep -v '^-' | sed ':a;N;$!ba;s/\n\n/ENTER/g' | sed ':a;N;$!ba;s/
do
echo "Removing message with ID '${KMSGID}'..."
postsuper -d "$KMSGID"
done
done

View file

@ -1,5 +1,5 @@
#!/bin/bash
set -euo pipefail
declare clients=( hiljainen.susurrando.com )
rm /etc/postfix/allowed_clients