2023-11-19 02:28:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-11-20 12:40:56 +00:00
|
|
|
SLEEP=${1:-10}
|
|
|
|
EXIT=${2:-0}
|
2023-11-19 02:28:59 +00:00
|
|
|
|
|
|
|
echo "Sleeping for $SLEEP seconds...";
|
|
|
|
|
2023-11-20 12:40:56 +00:00
|
|
|
sleep "$SLEEP";
|
2023-11-19 02:28:59 +00:00
|
|
|
|
|
|
|
echo "Waking up!";
|
|
|
|
|
2023-11-20 12:40:56 +00:00
|
|
|
if [ "$EXIT" -gt "0" ]; then
|
2023-11-19 02:36:20 +00:00
|
|
|
>&2 echo "Exiting with error code $EXIT";
|
|
|
|
else
|
|
|
|
echo "Exiting with error code $EXIT";
|
|
|
|
fi
|
|
|
|
|
2023-11-20 12:40:56 +00:00
|
|
|
exit "$EXIT";
|