Last active
March 3, 2017 22:41
-
-
Save kitsuyui/63de9f7d32e0ab4ca85e to your computer and use it in GitHub Desktop.
Debian 系で unattended-upgrades を有効にする場合の追加設定 (メール通知, autoremove, autoclean, 再起動) ref: http://qiita.com/kitsuyui/items/11b4c0ebb9d1d2181853
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APT::Periodic::AutocleanInterval "1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unattended-Upgrade::Automatic-Reboot-Time "02:00"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install -y unattended-upgrades | |
$ sudo dpkg-reconfigure -plow unattended-upgrades | |
(TUI が表示されるので <Yes> を選択する) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo editor /etc/apt/apt.conf.d/50unattended-upgrades |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unattended-Upgrade::Mail "じぶんのメールアドレス"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install -y mailutils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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