Skip to content

Instantly share code, notes, and snippets.

@kitsuyui
Last active March 3, 2017 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitsuyui/63de9f7d32e0ab4ca85e to your computer and use it in GitHub Desktop.
Save kitsuyui/63de9f7d32e0ab4ca85e to your computer and use it in GitHub Desktop.
Debian 系で unattended-upgrades を有効にする場合の追加設定 (メール通知, autoremove, autoclean, 再起動) ref: http://qiita.com/kitsuyui/items/11b4c0ebb9d1d2181853
APT::Periodic::AutocleanInterval "1";
Unattended-Upgrade::Automatic-Reboot-Time "02:00";
$ sudo apt-get install -y unattended-upgrades
$ sudo dpkg-reconfigure -plow unattended-upgrades
(TUI が表示されるので <Yes> を選択する)
$ sudo editor /etc/apt/apt.conf.d/50unattended-upgrades
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. A package that provides
// 'mailx' must be installed. E.g. "user@example.com"
//Unattended-Upgrade::Mail "root";
Unattended-Upgrade::Mail "じぶんのメールアドレス";
$ sudo apt-get install -y mailutils
$ sudo editor /etc/apt/apt.conf.d/50unattended-upgrades
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment