diff options
author | ggeorgg <georg@grossmann-technologies.de> | 2018-12-13 23:34:03 +0300 |
---|---|---|
committer | Daniel Hansson <github@hanssonit.se> | 2018-12-13 23:34:03 +0300 |
commit | f1680744f914190d5426ec93c692826548253aba (patch) | |
tree | a373a5b60a880719379af932c0a34846ed7a3d0c /lets-encrypt | |
parent | 87d9f32b94a4bba21a10c6aa9296052a95aa5df7 (diff) |
Replace almost all echos by printf function with color (#741)
Diffstat (limited to 'lets-encrypt')
-rw-r--r-- | lets-encrypt/activate-ssl.sh | 4 | ||||
-rw-r--r-- | lets-encrypt/test-new-config.sh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lets-encrypt/activate-ssl.sh b/lets-encrypt/activate-ssl.sh index b81a089e..133d9dcf 100644 --- a/lets-encrypt/activate-ssl.sh +++ b/lets-encrypt/activate-ssl.sh @@ -90,7 +90,7 @@ check_command download_le_script test-new-config # Check if $domain exists and is reachable echo -echo "Checking if $domain exists and is reachable..." +print_text_in_color "$Cyan" "Checking if $domain exists and is reachable..." if wget -q -T 10 -t 2 --spider "$domain"; then sleep 1 elif wget -q -T 10 -t 2 --spider --no-check-certificate "https://$domain"; then @@ -124,7 +124,7 @@ fi if [ ! -f "$ssl_conf" ] then touch "$ssl_conf" - echo "$ssl_conf was successfully created" + print_text_in_color "$Green" "$ssl_conf was successfully created." sleep 2 cat << SSL_CREATE > "$ssl_conf" <VirtualHost *:80> diff --git a/lets-encrypt/test-new-config.sh b/lets-encrypt/test-new-config.sh index 0f374923..7c97875b 100644 --- a/lets-encrypt/test-new-config.sh +++ b/lets-encrypt/test-new-config.sh @@ -37,7 +37,7 @@ Feel free to contribute to this project: https://goo.gl/3fQD65" FQDOMAIN=$(grep -m 1 "ServerName" "/etc/apache2/sites-enabled/$1" | awk '{print $2}') if [ "$(hostname)" != "$FQDOMAIN" ] then - echo "Setting hostname to $FQDOMAIN..." + print_text_in_color "$Cyan" "Setting hostname to $FQDOMAIN..." sudo sh -c "echo 'ServerName $FQDOMAIN' >> /etc/apache2/apache2.conf" sudo hostnamectl set-hostname "$FQDOMAIN" # Change /etc/hosts as well |