diff --git a/log-encryption/compose/bin/example.sh b/log-encryption/compose/bin/example.sh index 9f01e42..d598de1 100644 --- a/log-encryption/compose/bin/example.sh +++ b/log-encryption/compose/bin/example.sh @@ -4,6 +4,13 @@ set -eu apt-get update apt-get install -y openssl -echo "To be, or not to be, that is the question:" -echo "This message is generated by a Docker Compose Contract." \ - | /bin/bash /var/logging/bin/encrypt-log.sh /var/logging/logging.pub +# Run infinite loop +while true; do + date | while IFS= read -r line; do + # Print to screen + echo "Screen: $line" + # Send to your encrypt script + echo "$line" | /bin/bash /var/logging/bin/encrypt-log.sh /var/logging/logging.pub + done + sleep 1 +done diff --git a/log-encryption/pods/bin/example.sh b/log-encryption/pods/bin/example.sh index 2f75cb1..d598de1 100644 --- a/log-encryption/pods/bin/example.sh +++ b/log-encryption/pods/bin/example.sh @@ -4,6 +4,13 @@ set -eu apt-get update apt-get install -y openssl -echo "To be, or not to be, that is the question:" -echo "This message is generated from Podman Play Contract." \ - | /bin/bash /var/logging/bin/encrypt-log.sh /var/logging/logging.pub +# Run infinite loop +while true; do + date | while IFS= read -r line; do + # Print to screen + echo "Screen: $line" + # Send to your encrypt script + echo "$line" | /bin/bash /var/logging/bin/encrypt-log.sh /var/logging/logging.pub + done + sleep 1 +done