You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.9 KiB

12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
  1. #apt source
  2. cat << 'EOF' > /etc/apt/sources.list.d/debian.list
  3. deb http://freedom.dicea.unifi.it/debian/ wheezy main
  4. deb http://security.debian.org/ wheezy/updates main
  5. deb http://freedom.dicea.unifi.it/debian/ wheezy-updates main
  6. #deb http://freedom.dicea.unifi.it/debian-backports/ wheezy-backports main
  7. EOF
  8. apt-get update
  9. #date & time
  10. apt-get install ntpdate -y -q
  11. rm /etc/localtime
  12. ln -s /usr/share/zoneinfo/Europe/Rome /etc/localtime
  13. #log
  14. apt-get install rsyslog -y -q
  15. #email alias
  16. if [ `grep -c "root: " /etc/aliases` -lt 1 ]; then
  17. cat "root: roots@lilik.it" >> /etc/aliases
  18. else
  19. cat "alias for root alredy exists:"
  20. grep "root: " /etc/aliases
  21. fi
  22. hostname=$(hostname);
  23. #disable on hostname mail and lists
  24. if [ "$hostname" != "mail" ] && [ "$hostname" != "lists" ]; then
  25. apt-get install exim4 -y -q
  26. cat << 'EOF' > /etc/exim4/update-exim4.conf.conf
  27. # /etc/exim4/update-exim4.conf.conf
  28. #
  29. # Edit this file and /etc/mailname by hand and execute update-exim4.conf
  30. # yourself or use 'dpkg-reconfigure exim4-config'
  31. #
  32. # Please note that this is _not_ a dpkg-conffile and that automatic changes
  33. # to this file might happen. The code handling this will honor your local
  34. # changes, so this is usually fine, but will break local schemes that mess
  35. # around with multiple versions of the file.
  36. #
  37. # update-exim4.conf uses this file to determine variable values to generate
  38. # exim configuration macros for the configuration file.
  39. #
  40. # Most settings found in here do have corresponding questions in the
  41. # Debconf configuration, but not all of them.
  42. #
  43. # This is a Debian specific file
  44. dc_eximconfig_configtype='satellite'
  45. dc_other_hostnames='alpha.lilik.it'
  46. dc_local_interfaces='127.0.0.1 ; ::1'
  47. dc_readhost='alpha.lilik.it'
  48. dc_relay_domains=''
  49. dc_minimaldns='false'
  50. dc_relay_nets=''
  51. dc_smarthost='mail.lilik.it'
  52. CFILEMODE='644'
  53. dc_use_split_config='true'
  54. dc_hide_mailname='true'
  55. dc_mailname_in_oh='true'
  56. dc_localdelivery='mail_spool'
  57. EOF
  58. dpkg-reconfigure exim4-config
  59. fi
  60. #apt
  61. apt-get install cron-apt -y
  62. cp /usr/share/doc/cron-apt/examples/*-* /etc/cron-apt/action.d/
  63. #sed -i 's/[\t ]*dist-upgrade -d -y -o APT::Get::Show-Upgraded=true/dist-upgrade -y -o APT::Get::Show-Upgraded=true/g' /etc/cron-apt/action.d/3-download
  64. sed -i 's/[\t ]MAILTO="root"/MAILTO="roots@lists.lilik.it"/g' /etc/cron-apt/config
  65. cat << 'EOF' >/etc/cron-apt/config
  66. # Configuration for cron-apt. For further information about the possible
  67. # configuration settings see /usr/share/doc/cron-apt/README.gz.
  68. # The email address to send mail to.
  69. MAILTO="root"
  70. # Value: error (send mail on error runs)
  71. # upgrade (when packages is upgraded)
  72. # changes (mail when change in output from an action)
  73. # output (send mail when output is generated)
  74. # always (always send mail)
  75. # (else never send mail)
  76. MAILON="upgrade"
  77. EOF
  78. #locales
  79. sed -i 's/#[\t ]*it_IT.UTF-8 UTF-8/it_IT.UTF-8 UTF-8/g' /etc/locale.gen
  80. locale-gen