mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-09 23:18:20 +00:00
Merge pull request #60 from claudobahn/upgrade_tweaks
Preserve all SSH configuration, including host keys, and also preserve Wireguard keys.
This commit is contained in:
commit
1be5582525
@ -6,7 +6,8 @@ mkdir /opt/Upgrade/preserve
|
|||||||
wget --no-check-certificate https://github.com/gtxaspec/wz_mini_hacks/archive/refs/heads/master.zip -O /opt/Upgrade/wz_mini.zip; sync
|
wget --no-check-certificate https://github.com/gtxaspec/wz_mini_hacks/archive/refs/heads/master.zip -O /opt/Upgrade/wz_mini.zip; sync
|
||||||
unzip /opt/Upgrade/wz_mini.zip -d /opt/Upgrade/
|
unzip /opt/Upgrade/wz_mini.zip -d /opt/Upgrade/
|
||||||
cp /opt/wz_mini/wz_mini.conf /opt/Upgrade/preserve/
|
cp /opt/wz_mini/wz_mini.conf /opt/Upgrade/preserve/
|
||||||
cp /opt/wz_mini/etc/ssh/authorized_keys /opt/Upgrade/preserve/
|
cp -r /opt/wz_mini/etc/ssh /opt/Upgrade/preserve/
|
||||||
|
cp -r /opt/wz_mini/etc/wireguard /opt/Upgrade/preserve/
|
||||||
sync
|
sync
|
||||||
reboot
|
reboot
|
||||||
}
|
}
|
||||||
@ -22,8 +23,10 @@ mv /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/* /opt/wz_mini/
|
|||||||
rm -f /opt/factory_t31_ZMC6tiIDQN
|
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
|
||||||
|
|
||||||
cp /opt/Upgrade/preserve/authorized_keys /opt/wz_mini/etc/ssh/
|
diff /opt/wz_mini/wz_mini.conf /opt/Upgrade/preserve/wz_mini.conf
|
||||||
cp /opt/Upgrade/preserve/wz_mini.conf /opt/wz_mini/
|
cp /opt/Upgrade/preserve/wz_mini.conf /opt/wz_mini/
|
||||||
|
cp /opt/Upgrade/preserve/ssh/* /opt/wz_mini/etc/ssh/
|
||||||
|
cp -r /opt/Upgrade/preserve/wireguard /opt/wz_mini/etc/
|
||||||
rm -rf /opt/Upgrade
|
rm -rf /opt/Upgrade
|
||||||
sync
|
sync
|
||||||
reboot
|
reboot
|
||||||
|
Loading…
Reference in New Issue
Block a user