entrypoint.sh 340 B

1234567891011121314151617
  1. #!/bin/sh
  2. # Check if the TZ environment variable is set
  3. if [ -n "$TZ" ]; then
  4. # Set the timezone
  5. echo "Setting timezone to $TZ"
  6. ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
  7. else
  8. echo "Timezone not specified. Using default timezone."
  9. fi
  10. # Start cron
  11. echo "Starting cron..."
  12. cron -f