mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-25 14:57:19 +00:00
fix upgrade script when there are line differences between the old and new configs, keep the old config
This commit is contained in:
parent
041e7d2663
commit
7a108fc734
@ -102,7 +102,16 @@ rm -f /opt/factory_t31_ZMC6tiIDQN
|
|||||||
mv /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/factory_t31_ZMC6tiIDQN /opt/factory_t31_ZMC6tiIDQN
|
mv /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/factory_t31_ZMC6tiIDQN /opt/factory_t31_ZMC6tiIDQN
|
||||||
|
|
||||||
diff /opt/wz_mini/wz_mini.conf /opt/Upgrade/preserve/wz_mini.conf
|
diff /opt/wz_mini/wz_mini.conf /opt/Upgrade/preserve/wz_mini.conf
|
||||||
|
|
||||||
|
if [ $(cat /opt/Upgrade/preserve/wz_mini.conf | wc -l) != $(cat /opt/wz_mini/wz_mini.conf | wc -l) ]; then
|
||||||
|
echo "doesn't match, keep old config"
|
||||||
|
mv /opt/wz_mini/wz_mini.conf /opt/wz_mini/wz_mini.conf.dist
|
||||||
cp /opt/Upgrade/preserve/wz_mini.conf /opt/wz_mini/
|
cp /opt/Upgrade/preserve/wz_mini.conf /opt/wz_mini/
|
||||||
|
else
|
||||||
|
echo "configs match"
|
||||||
|
cp /opt/Upgrade/preserve/wz_mini.conf /opt/wz_mini/
|
||||||
|
fi
|
||||||
|
|
||||||
cp /opt/Upgrade/preserve/ssh/* /opt/wz_mini/etc/ssh/
|
cp /opt/Upgrade/preserve/ssh/* /opt/wz_mini/etc/ssh/
|
||||||
cp /opt/Upgrade/preserve/configs/* /opt/wz_mini/etc/configs
|
cp /opt/Upgrade/preserve/configs/* /opt/wz_mini/etc/configs
|
||||||
cp -r /opt/Upgrade/preserve/wireguard /opt/wz_mini/etc/
|
cp -r /opt/Upgrade/preserve/wireguard /opt/wz_mini/etc/
|
||||||
|
Loading…
Reference in New Issue
Block a user