Giter Site home page Giter Site logo

openwrt-automatic-package-reinstaller's Introduction

OpenWRT automatic package reinstaller

This script reinstalls critical packages after you upgrade your OpenWRT so you can get back to them remotely.

Installation

01 Upload the script

  • place script in /root/opkg_reinstall_after_fw_upgrade/opkg_reinstall.sh

02 Let the script know to not launch with current system and add execute bit

-run in terminal:

touch "/etc/_OPKG_REINSTALL_COMPLETE"
chmod 0755 /root/opkg_reinstall_after_fw_upgrade/opkg_reinstall.sh

03 Edit /etc/sysupgrade.conf

  • add directory /root
## This file contains files and directories that should
## be preserved during an upgrade.

# /etc/example.conf
# /etc/openvpn/

/root

04 Edit /etc/rc.local

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

( /bin/sleep 30; /bin/sh /root/opkg_reinstall_after_fw_upgrade/opkg_reinstall.sh ) &

exit 0

Flash new firmware image

  • retain the settings

Customization

  • add or remove packages, make sure all of them are available
  • if your wifi is not configured, please remove the waitForInternetConnection at the bottom of the file

Tips

  • check logs after each update
  • if you have the option, try new OpenWRT versions first on remote locations you have other means of access to (eg. public IPv6, physical closeness)
  • try the script before you depend on it

Credits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.