be extra careful
This commit is contained in:
parent
b5801a9bfa
commit
66e8be4176
@ -105,10 +105,15 @@ else
|
||||
# First remove the keys generated by the installation script
|
||||
rm -f "$RUSTDESK_INSTALL_DIR"/id_*
|
||||
# Then copy over the old keys to the new install dir
|
||||
# Only remove the old dir if the copy was succesful
|
||||
if cp -f /opt/rustdesk/id_* "$RUSTDESK_INSTALL_DIR/"
|
||||
then
|
||||
# Make sure to really protect the old keys by checking that the new service actually restarts with 0 status before removing the old keys.
|
||||
if systemctl restart rustdesk-hbbr.service && systemctl restart rustdesk-hbbs.service
|
||||
then
|
||||
rm -rf /opt/rustdesk
|
||||
else
|
||||
msg_box "Sorry, couldn't restart the new services. Please send your output to https://github.com/rustdesk/rustdesk-server-pro in a new issue."
|
||||
fi
|
||||
else
|
||||
msg_box "Sorry, but it seems that something went wrong with copying your old keys to the new install dir. Please try again"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user