X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-end;h=91c7a832ebd0b5e5af1d9b2eae1bbe08d172b200;hb=7cc6197f74e97cb522894046718712cd03d3d385;hp=0e7c4b8197dab344b80a00602e76365deaa84dfa;hpb=45bb8be590318ef8f34df0d22aa9b54a83adc42e;p=distro-setup diff --git a/distro-end b/distro-end index 0e7c4b8..91c7a83 100755 --- a/distro-end +++ b/distro-end @@ -181,6 +181,18 @@ sgo certbotmail.timer pi ${p1[@]} +##### begin automatic upgrades #### +# this makes it so we upgrade everything +debconf-set-selections <<'EOF' +unattended-upgrades unattended-upgrades/origins_pattern string "codename=${distro_codename}"; +EOF +dpkg-reconfigure -u -fnoninteractive unattended-upgrades + +# Setup daily reboots, so all unattended upgrades go into affect +# unattended upgrades happen at 6 am + rand(60 min). +echo '20 7 * * * root /usr/local/bin/zelous-unattended-reboot' >/etc/cron.d/unattended-upgrade-reboot +##### end automatic upgrades #### + ## prometheus node exporter setup web-conf -f 9100 -p 9101 apache2 $(hostname -f) <<'EOF' @@ -731,6 +743,37 @@ EOF fi ######### end pump.io periodic backup ############# + +######### begin irc periodic backup ############# +if [[ $HOSTNAME == frodo ]]; then + s dd of=/etc/systemd/system/ircbackup.service <<'EOF' +[Unit] +Description=irc li backup +After=multi-user.target + +[Service] +User=iank +Type=oneshot +ExecStart=/a/bin/log-quiet/sysd-mail-once irc-backup rsync -rlptDhSAX --delete root@iankelling.org:/var/lib/znc/moddata/log/iank/freenode/ /k/irclogs +EOF + s dd of=/etc/systemd/system/ircbackup.timer <<'EOF' +[Unit] +Description=irc li backup hourly + +[Timer] +OnCalendar=hourly + +[Install] +WantedBy=timers.target +EOF + s systemctl daemon-reload + sgo ircbackup.timer +fi + + +######### end irc periodic backup ############# + + # https://github.com/jlebon/textern cd /a/opt/textern make native-install USER=1 @@ -1275,8 +1318,11 @@ EOF rpc_pass=$(