From e8bd1c21a01ce82cf2713c4d8904e00c3bc41f8e Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 1 May 2023 13:13:59 -0400 Subject: [PATCH] Update octoprint.sh create update script --- ct/octoprint.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ct/octoprint.sh b/ct/octoprint.sh index e7b93f45..e53023a6 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -53,10 +53,18 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/octoprint ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP LXC" -apt-get update &>/dev/null -apt-get -y upgrade &>/dev/null -msg_ok "Updated $APP LXC" +msg_info "Stopping OctoPrint" +systemctl stop octoprint +msg_ok "Stopped OctoPrint" + +msg_info "Updating OctoPrint" +pip3 install octoprint --upgrade &>/dev/null +msg_ok "Updated OctoPrint" + +msg_info "Starting OctoPrint" +systemctl start octoprint +msg_ok "Started OctoPrint" +msg_ok "Updated Successfully" exit }