Replace echo -e with printf for portable ANSI banners
dash (Debian's /bin/sh) doesn't support echo's -e flag: it prints "-e" literally as text before processing the rest of the string's backslash escapes. Every script's colored banner was affected. printf's escape handling is POSIX-mandated and behaves identically under dash and bash, so swap all 90 echo -e calls for printf, appending the trailing \n that echo used to add implicitly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo -e '\033[35m
|
||||
printf '\033[35m
|
||||
__ ______ ______
|
||||
/ |/ / | / _/ /
|
||||
/ /|_/ / /| | / // /
|
||||
/ / / / ___ |_/ // /___
|
||||
/_/ /_/_/ |_/___/_____/
|
||||
\033[0m'
|
||||
echo -e "\033[35;1mEnable mail sending for php \033[0m"
|
||||
\033[0m\n'
|
||||
printf "\033[35;1mEnable mail sending for php \033[0m\n"
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
@@ -29,7 +29,7 @@ fi
|
||||
# http://www.sycha.com/lamp-setup-debian-linux-apache-mysql-php#anchor13
|
||||
sleep 2
|
||||
apt-get --yes install exim4
|
||||
echo -e "\033[35;1mConfiguring EXIM4 \033[0m"
|
||||
printf "\033[35;1mConfiguring EXIM4 \033[0m\n"
|
||||
while [ "$configexim" != "y" ] && [ "$configexim" != "n" ]
|
||||
do
|
||||
echo -n "Should we configure exim4 ? [y|n] "
|
||||
@@ -48,7 +48,7 @@ systemctl restart exim4
|
||||
|
||||
# dkim spf
|
||||
# https://debian-administration.org/article/718/DKIM-signing_outgoing_mail_with_exim4
|
||||
echo -e "\033[35;1mConfiguring DKIM \033[0m"
|
||||
printf "\033[35;1mConfiguring DKIM \033[0m\n"
|
||||
while [ "$installdkim" != "y" ] && [ "$installdkim" != "n" ]
|
||||
do
|
||||
echo -n "Should we install dkim for exim4 ? [y|n] "
|
||||
|
||||
Reference in New Issue
Block a user