diff --git a/ct/openthread-br.sh b/ct/openthread-br.sh index c0156183c..bc8431976 100644 --- a/ct/openthread-br.sh +++ b/ct/openthread-br.sh @@ -47,6 +47,10 @@ function update_script() { systemctl stop otbr-agent msg_ok "Stopped Services" + msg_info "Backing up Configuration" + cp /etc/default/otbr-agent /etc/default/otbr-agent.bak + msg_ok "Backed up Configuration" + msg_info "Updating Source" $STD git reset --hard origin/main $STD git submodule update --depth 1 --init --recursive @@ -91,6 +95,10 @@ EOF msg_ok "Configured Network" fi + msg_info "Restoring Configuration" + mv /etc/default/otbr-agent.bak /etc/default/otbr-agent + msg_ok "Restored Configuration" + msg_info "Starting Services" systemctl start otbr-agent systemctl start otbr-web