Skip to content

Instantly share code, notes, and snippets.

@Torenable
Forked from franklinmoy3/opkg_updater.sh
Created October 18, 2025 23:02
Show Gist options
  • Select an option

  • Save Torenable/f0211cf67b219a8b76032400be0e7757 to your computer and use it in GitHub Desktop.

Select an option

Save Torenable/f0211cf67b219a8b76032400be0e7757 to your computer and use it in GitHub Desktop.
OpenWRT OPKG update all installed packages
#!/bin/sh
# Example of job definition (as add job using crontab -e):
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# 30 02 15,28 * * /root/opkg_updater.sh
opkg update && opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment