1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Rename omr-update script to be executed after all others

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-01-09 08:42:19 +01:00
parent 4535f2ad44
commit 57debb6681

View file

@ -0,0 +1,18 @@
#!/bin/sh
cd /etc/uci-defaults || exit 0
source /etc/os-release
OMRVERSION=$(echo $VERSION | sed 's/v//')
files="$(ls /etc/uci-defaults/)"
[ -n "$files" ] && {
mkdir -p /usr/share/omr-update
if [ "$(grep rom /etc/mtab)" = "" ]; then
rm /usr/share/omr-update/*
cp /etc/uci-defaults/* /usr/share/omr-update
fi
uci -q set openmptcprouter.settings=settings
uci -q set openmptcprouter.settings.version=${OMRVERSION}
uci -q commit
}
exit 0