firstrun.sh 594 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # Check if config exists. If not, copy in the sample config
  3. if [ -f /config/proxy-config.conf ]; then
  4. echo "Using existing config file."
  5. else
  6. echo "Creating config from template."
  7. mv /etc/apache2/000-default.conf /config/proxy-config.conf
  8. cp /root/.htpasswd /config/.htpasswd
  9. fi
  10. # Add Persistent Cron Configuration Capability
  11. if [ -f /config/crons.conf ]; then
  12. echo "Using existing Cron config file."
  13. # crontab /config/crons.conf
  14. # cron
  15. else
  16. echo "Copying blank Cron config file."
  17. cp /root/crons.conf /config/crons.conf
  18. # crontab /config/crons.conf
  19. # cron
  20. fi