Add euo to scripts
This commit is contained in:
parent
8c47dffb01
commit
358d7ef176
5 changed files with 7 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
FILTER_PATH='/var/spool/filter'
|
FILTER_PATH='/var/spool/filter'
|
||||||
while read -r FOLDER
|
while read -r FOLDER
|
||||||
do
|
do
|
||||||
tar cjf "${FOLDER}.tar.bz2" "${FOLDER}" &> /dev/null && rm -rf "${FOLDER}"
|
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]*$")"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
# http://www.postfix.org/FILTER_README.html
|
# http://www.postfix.org/FILTER_README.html
|
||||||
# Clean up when done or when aborting.
|
# Clean up when done or when aborting.
|
||||||
finished=false
|
finished=false
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
[ -r /var/lib/from_repos/ad_scripts/shared_functions.sh ] && . /var/lib/from_repos/ad_scripts/shared_functions.sh
|
[ -r /var/lib/from_repos/ad_scripts/shared_functions.sh ] && . /var/lib/from_repos/ad_scripts/shared_functions.sh
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
if [[ "$1" == "" ]]
|
if [[ "$1" == "" ]]
|
||||||
then
|
then
|
||||||
echo "Indicate a string to search in the postqueue."
|
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
|
do
|
||||||
echo "Removing message with ID '${KMSGID}'..."
|
echo "Removing message with ID '${KMSGID}'..."
|
||||||
postsuper -d "$KMSGID"
|
postsuper -d "$KMSGID"
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
declare clients=( hiljainen.susurrando.com )
|
declare clients=( hiljainen.susurrando.com )
|
||||||
|
|
||||||
rm /etc/postfix/allowed_clients
|
rm /etc/postfix/allowed_clients
|
||||||
|
|
Loading…
Reference in a new issue