blob: d4b9b56bb3267247f7268ef98db8ba1bb0f98684 [file] [log] [blame]
#!/bin/bash
# fake-service.sh - a fake service for start/stop testing
# $1 - sleep time
SLEEP_TIME=${1:-3}
LOG=/tmp/fake-service.log
TIMESTAMP_FORMAT=${TIMESTAMP_FORMAT:-"%F-%H%M%S"}
# duplicate output
exec 1> >(tee -a ${LOG})
echo ""
echo "Starting fake-service for ${SLEEP_TIME}"
while true; do
echo "$(date +${TIMESTAMP_FORMAT}) [$$]"
sleep ${SLEEP_TIME}
done