mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Try to reinstall packages less often and only for 1 day
This commit is contained in:
parent
27be75b03c
commit
b799eb7e9b
1 changed files with 3 additions and 1 deletions
|
@ -1704,9 +1704,11 @@ if [ -f /etc/init.d/omr-bypass ] && (([ -f /usr/sbin/iptables-legacy-save ] && [
|
|||
sleep 5
|
||||
fi
|
||||
|
||||
if [ -f /etc/backup/installed_packages.txt ] && [ -n "$(grep overlay /etc/backup/installed_packages.txt)" ]; then
|
||||
if [ -f /etc/backup/installed_packages.txt ] && [ -n "$(grep overlay /etc/backup/installed_packages.txt)" ] && ([ "$(uci -q get openmptcprouter.settings.sysupgrade_lc)" = "" ] || [ $(($(date +"%s") + $((30 + RANDOM % 31)) - $(uci -q get openmptcprouter.settings.sysupgrade_lc))) -gt 3600 ]) && [ $(($(date +"%s") - $(stat -c "%Y" /etc/backup/installed_packages.txt))) -gt 86400 ]; then
|
||||
_log "Reinstall packages..."
|
||||
uci -q set openmptcprouter.settings.sysupgrade_lc=$(date +"%s")
|
||||
/etc/init.d/sysupgrade restart 2>&1 >/dev/null
|
||||
sleep 10
|
||||
fi
|
||||
|
||||
if [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep token_error=\'1\')" != "" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue