Skip to content

Instantly share code, notes, and snippets.

@fbouynot
Last active September 27, 2023 14:48
Show Gist options
  • Save fbouynot/47fa9b35bfeb5a2a8c3ae480cc4fd97a to your computer and use it in GitHub Desktop.
Save fbouynot/47fa9b35bfeb5a2a8c3ae480cc4fd97a to your computer and use it in GitHub Desktop.
Fedora dist-upgrade
[Unit]
Description=Scheduled Dist Upgrade
[Service]
Type=oneshot
ExecStart=/opt/dist-upgrade.sh
#!/bin/bash
set -eu
/usr/bin/dnf install -y dnf-plugin-system-upgrade || true
/usr/bin/dnf system-upgrade download -y --refresh --releasever=$(( $(/usr/bin/rpm -E %fedora) + 1 ))
/usr/bin/dnf system-upgrade reboot
[Unit]
Description=Reboot Dist Upgrade.
[Timer]
OnCalendar=*-5,11-27 20:00:00
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment