mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-26 02:57:04 +00:00
allow apt to perform security updates on its own
This commit is contained in:
parent
2d5097345a
commit
eab28c97ff
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
source setup/functions.sh
|
source setup/functions.sh
|
||||||
|
|
||||||
apt_install python3-flask links duplicity libyaml-dev python3-dnspython
|
apt_install python3-flask links duplicity libyaml-dev python3-dnspython unattended-upgrades
|
||||||
hide_output pip3 install rtyaml
|
hide_output pip3 install rtyaml
|
||||||
|
|
||||||
# Create a backup directory and a random key for encrypting backups.
|
# Create a backup directory and a random key for encrypting backups.
|
||||||
@ -21,6 +21,14 @@ rm -f /etc/init.d/mailinabox
|
|||||||
ln -s $(pwd)/conf/management-initscript /etc/init.d/mailinabox
|
ln -s $(pwd)/conf/management-initscript /etc/init.d/mailinabox
|
||||||
hide_output update-rc.d mailinabox defaults
|
hide_output update-rc.d mailinabox defaults
|
||||||
|
|
||||||
|
# Allow apt to install system updates automatically every day.
|
||||||
|
cat > /etc/apt/apt.conf.d/02periodic <<EOF;
|
||||||
|
APT::Periodic::MaxAge "7";
|
||||||
|
APT::Periodic::Update-Package-Lists "1";
|
||||||
|
APT::Periodic::Unattended-Upgrade "1";
|
||||||
|
APT::Periodic::Verbose "1";
|
||||||
|
EOF
|
||||||
|
|
||||||
# Perform a daily backup.
|
# Perform a daily backup.
|
||||||
cat > /etc/cron.daily/mailinabox-backup << EOF;
|
cat > /etc/cron.daily/mailinabox-backup << EOF;
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
Loading…
Reference in New Issue
Block a user