Skip to content

Instantly share code, notes, and snippets.

@franklinmoy3
Last active April 14, 2025 00:41
Show Gist options
  • Save franklinmoy3/91edc0c66c68a3f9343ada50ed7bd0e8 to your computer and use it in GitHub Desktop.
Save franklinmoy3/91edc0c66c68a3f9343ada50ed7bd0e8 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