fix: shellcheck tipps

This commit is contained in:
sujiba 2024-07-07 21:17:01 +02:00
parent 9d6f036ead
commit 43417c1b97
3 changed files with 7 additions and 10 deletions

View file

@ -16,7 +16,7 @@ echo " > Find more @ https://github.com/drwetter/testssl.sh"
echo -e "$GREEN" echo -e "$GREEN"
echo " > Bitte gib die komplette URL (z.B. https://test.example.com) an." echo " > Bitte gib die komplette URL (z.B. https://test.example.com) an."
read -p " > Welche Webseite soll getestet werden? " WEBSITE read -rp " > Welche Webseite soll getestet werden? " WEBSITE
echo -e "${RESET}" echo -e "${RESET}"
docker pull drwetter/testssl.sh docker pull drwetter/testssl.sh

View file

@ -15,17 +15,15 @@ for compose_file in /opt/docker/**/docker-compose.yml; do
done done
echo "> Containers have been updated." echo "> Containers have been updated."
echo ""
confirm=n confirm=n
read -p " echo "
> Do you want to prune docker? [y/N] > WARNING! The following confirmation will remove:
> WARNING! This will remove:
> - all stopped containers > - all stopped containers
> - all networks not used by at least one container > - all networks not used by at least one container
> - all dangling images > - all dangling images
> - unused build cache > - unused build cache"
" confirm read -rp "> Do you want to prune docker? [y/N] " confirm
echo "" echo ""
if [[ $confirm == [yY] ]]; then if [[ $confirm == [yY] ]]; then

View file

@ -23,9 +23,8 @@ then
/usr/bin/umount /mnt/uploads/ /usr/bin/umount /mnt/uploads/
# if rsync is successful, remove all files # if rsync is successful, remove all files
if [ "$?" -eq "0" ] if [ "$?" -eq "0" ]; then
then rm -rf rm "${SOURCE:?}/"*
rm -rf rm $SOURCE/*
echo "> synced files have been removed from source" echo "> synced files have been removed from source"
else else
echo "> error" echo "> error"