Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions log-encryption/compose/bin/example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 10 additions & 3 deletions log-encryption/pods/bin/example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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