From a50dce20debb2954ceb670ed5d8d2270a743e01f Mon Sep 17 00:00:00 2001
From: th33xitus
Date: Wed, 30 Aug 2023 19:42:32 +0200
Subject: [PATCH 01/25] fix(backups): add backup function for OctoEverywhere
fix #380
Signed-off-by: Dominik Willner
---
scripts/backup.sh | 16 ++++++++++++++++
scripts/ui/backup_menu.sh | 4 +++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/scripts/backup.sh b/scripts/backup.sh
index cdb9af7..d885895 100755
--- a/scripts/backup.sh
+++ b/scripts/backup.sh
@@ -191,3 +191,19 @@ function backup_telegram_bot() {
print_error "Can't back up MoonrakerTelegramBot directory!\n Not found!"
fi
}
+
+function backup_octoeverywhere() {
+ local current_date
+
+ if [[ -d ${OCTOEVERYWHERE_DIR} ]] ; then
+ status_msg "Creating OctoEverywhere backup ..."
+ check_for_backup_dir
+ current_date=$(get_date)
+ status_msg "Timestamp: ${current_date}"
+ mkdir -p "${BACKUP_DIR}/OctoEverywhere-backups/${current_date}"
+ cp -r "${OCTOEVERYWHERE_DIR}" "${_}" && cp -r "${OCTOEVERYWHERE_ENV}" "${_}"
+ print_confirm "OctoEverywhere backup complete!"
+ else
+ print_error "Can't back up OctoEverywhere directory!\n Not found!"
+ fi
+}
diff --git a/scripts/ui/backup_menu.sh b/scripts/ui/backup_menu.sh
index 297c2f0..97bae83 100755
--- a/scripts/ui/backup_menu.sh
+++ b/scripts/ui/backup_menu.sh
@@ -25,7 +25,7 @@ function backup_ui() {
echo -e "| | |"
echo -e "| Klipper Webinterface: | Other: |"
echo -e "| 5) [Mainsail] | 9) [Telegram Bot] |"
- echo -e "| 6) [Fluidd] | |"
+ echo -e "| 6) [Fluidd] | 10) [OctoEverywhere] |"
back_footer
}
@@ -54,6 +54,8 @@ function backup_menu() {
do_action "backup_octoprint" "backup_ui";;
9)
do_action "backup_telegram_bot" "backup_ui";;
+ 10)
+ do_action "backup_octoeverywhere" "backup_ui";;
B|b)
clear; main_menu; break;;
*)
From d99cda544a1c5ec5a4da87313cf53065726f9533 Mon Sep 17 00:00:00 2001
From: th33xitus
Date: Wed, 30 Aug 2023 19:48:19 +0200
Subject: [PATCH 02/25] fix(backups): add backup before update function for
KlipperScreen
Signed-off-by: Dominik Willner
---
scripts/klipperscreen.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/klipperscreen.sh b/scripts/klipperscreen.sh
index bd18d70..21b7f3b 100644
--- a/scripts/klipperscreen.sh
+++ b/scripts/klipperscreen.sh
@@ -119,6 +119,8 @@ function update_klipperscreen() {
old_md5=$(md5sum "${KLIPPERSCREEN_DIR}/scripts/KlipperScreen-requirements.txt" | cut -d " " -f1)
do_action_service "stop" "KlipperScreen"
+ backup_before_update "klipperscreen"
+
cd "${KLIPPERSCREEN_DIR}"
git pull origin master -q && ok_msg "Fetch successfull!"
git checkout -f master && ok_msg "Checkout successfull"
From 0b6613e4647accfa7d85592f0c7f3456ce397d4f Mon Sep 17 00:00:00 2001
From: th33xitus
Date: Mon, 4 Sep 2023 21:02:22 +0200
Subject: [PATCH 03/25] fix(backups): fix broken moonraker database target
folder name
Signed-off-by: Dominik Willner
---
scripts/backup.sh | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/scripts/backup.sh b/scripts/backup.sh
index d885895..d58aae4 100755
--- a/scripts/backup.sh
+++ b/scripts/backup.sh
@@ -61,20 +61,22 @@ function backup_moonraker_database() {
local current_date db_pathes
db_pathes=$(get_instance_folder_path "database")
- readarray -t -d" " instance_names < <(get_multi_instance_names)
if [[ -n ${db_pathes} ]]; then
current_date=$(get_date)
status_msg "Timestamp: ${current_date}"
- local i=0 database
+ local i=0 database folder_name target_dir
for database in ${db_pathes}; do
- local folder_name="${instance_names[${i}]}"
status_msg "Create backup of ${database} ..."
- mkdir -p "${BACKUP_DIR}/moonraker_databases/${current_date}/${folder_name}"
- cp -r "${database}" "${_}"
- ok_msg "Backup created in:\n${BACKUP_DIR}/moonraker_databases/${current_date}/${folder_name}"
+
+ folder_name=$(echo "${database}" | rev | cut -d"/" -f2 | rev)
+ target_dir="${BACKUP_DIR}/moonraker_databases/${current_date}/${folder_name}"
+ mkdir -p "${target_dir}"
+ cp -r "${database}" "${target_dir}"
i=$(( i + 1 ))
+
+ ok_msg "Backup created in:\n${target_dir}"
done
else
print_error "No Moonraker database found! Skipping backup ..."
From b88d0085baed88eef4d6f75bfed9dd935008abd7 Mon Sep 17 00:00:00 2001
From: th33xitus
Date: Mon, 4 Sep 2023 21:17:10 +0200
Subject: [PATCH 04/25] fix(backups): fix broken config target folder name
Signed-off-by: Dominik Willner
---
scripts/backup.sh | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/scripts/backup.sh b/scripts/backup.sh
index d58aae4..d3baa02 100755
--- a/scripts/backup.sh
+++ b/scripts/backup.sh
@@ -33,23 +33,25 @@ function backup_before_update() {
function backup_config_dir() {
check_for_backup_dir
- local current_date instance_names config_pathes
+ local current_date config_pathes
config_pathes=$(get_config_folders)
- readarray -t -d" " instance_names < <(get_multi_instance_names)
if [[ -n "${config_pathes}" ]]; then
current_date=$(get_date)
status_msg "Timestamp: ${current_date}"
- local i=0 folder
+ local i=0 folder folder_name target_dir
for folder in ${config_pathes}; do
- local folder_name="${instance_names[${i}]}"
status_msg "Create backup of ${folder} ..."
- mkdir -p "${BACKUP_DIR}/configs/${current_date}/${folder_name}"
- cp -r "${folder}" "${_}"
- ok_msg "Backup created in:\n${BACKUP_DIR}/configs/${current_date}/${folder_name}"
+
+ folder_name=$(echo "${folder}" | rev | cut -d"/" -f2 | rev)
+ target_dir="${BACKUP_DIR}/configs/${current_date}/${folder_name}"
+ mkdir -p "${target_dir}"
+ cp -r "${folder}" "${target_dir}"
i=$(( i + 1 ))
+
+ ok_msg "Backup created in:\n${target_dir}"
done
else
ok_msg "No config directory found! Skipping backup ..."
From 16d3388ff22f2e42a9568eb5c5ffae348bad7271 Mon Sep 17 00:00:00 2001
From: Kenneth Jiang
Date: Fri, 29 Sep 2023 11:20:21 -0700
Subject: [PATCH 05/25] refactor: make the 'Obico for Klipper' name consistent
(#385)
---
scripts/obico.sh | 57 ++++++++++++++++++++---------------------
scripts/ui/main_menu.sh | 2 +-
2 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/scripts/obico.sh b/scripts/obico.sh
index 46f9e28..eeca2c9 100644
--- a/scripts/obico.sh
+++ b/scripts/obico.sh
@@ -63,7 +63,7 @@ function obico_server_url_prompt() {
}
function moonraker_obico_setup_dialog() {
- status_msg "Initializing Moonraker-obico installation ..."
+ status_msg "Initializing Obico installation ..."
local moonraker_count
local moonraker_names
@@ -73,7 +73,7 @@ function moonraker_obico_setup_dialog() {
if (( moonraker_count == 0 )); then
### return early if moonraker is not installed
local error="Moonraker not installed! Please install Moonraker first!"
- log_error "Moonraker-obico setup started without Moonraker being installed. Aborting setup."
+ log_error "Obico setup started without Moonraker being installed. Aborting setup."
print_error "${error}" && return
elif (( moonraker_count > 1 )); then
# moonraker_names is valid only in case of multi-instance
@@ -90,10 +90,10 @@ function moonraker_obico_setup_dialog() {
if (( allowed_moonraker_obico_count == 0 && moonraker_count > 0 )) && [[ $(get_moonraker_obico_status) != "Not linked!" ]]; then
local yn
while true; do
- echo "${yellow}Obico for Klipper is already installed.${white}"
+ echo "${yellow}Obico is already installed.${white}"
echo "It is safe to run the install again to repair any issues."
echo ""
- local question="Do you want to reinstall Obico for Klipper?"
+ local question="Do you want to reinstall Obico?"
read -p "${cyan}###### ${question} (Y/n):${white} " yn
case "${yn}" in
Y|y|Yes|yes|"")
@@ -101,7 +101,7 @@ function moonraker_obico_setup_dialog() {
break;;
N|n|No|no)
select_msg "No"
- abort_msg "Exiting Obico for Klipper installation...\n"
+ abort_msg "Exiting Obico installation...\n"
return;;
*)
error_msg "Invalid Input!";;
@@ -126,31 +126,30 @@ function moonraker_obico_setup_dialog() {
done
blank_line
if (( existing_moonraker_obico_count > 0 )); then
- printf "|${green}%-55s${white}|\n" " ${existing_moonraker_obico_count} Moonraker-obico instances already installed!"
+ printf "|${green}%-55s${white}|\n" " ${existing_moonraker_obico_count} Obico instances already installed!"
for svc in ${moonraker_obico_services}; do
printf "|${cyan}%-57s${white}|\n" " ● moonraker-obco-$(get_instance_name "${svc}")"
done
fi
blank_line
- echo -e "| The setup will apply the same names to |"
- echo -e "| Moonraker-obico! |"
+ echo -e "| The setup will apply the same names to Obico! |"
blank_line
- echo -e "| Please select the number of Moonraker-obico instances |"
- echo -e "| to install. Usually one Moonraker-obico instance per |"
+ echo -e "| Please select the number of Obico instances |"
+ echo -e "| to install. Usually one Obico instance per |"
echo -e "| Moonraker instance is required, but you may not |"
- echo -e "| install more Moonraker-obico instances than available |"
+ echo -e "| install more Obico instances than available |"
echo -e "| Moonraker instances. |"
bottom_border
### ask for amount of instances
local re="^[1-9][0-9]*$"
while [[ ! ${new_moonraker_obico_count} =~ ${re} || ${new_moonraker_obico_count} -gt ${allowed_moonraker_obico_count} ]]; do
- read -p "${cyan}###### Number of new Moonraker-obico instances to set up:${white} " -i "${allowed_moonraker_obico_count}" -e new_moonraker_obico_count
+ read -p "${cyan}###### Number of new Obico instances to set up:${white} " -i "${allowed_moonraker_obico_count}" -e new_moonraker_obico_count
### break if input is valid
[[ ${new_moonraker_obico_count} =~ ${re} && ${new_moonraker_obico_count} -le ${allowed_moonraker_obico_count} ]] && break
### conditional error messages
[[ ! ${new_moonraker_obico_count} =~ ${re} ]] && error_msg "Input not a number"
- (( new_moonraker_obico_count > allowed_moonraker_obico_count )) && error_msg "Number of Moonraker-obico instances larger than installed Moonraker instances"
+ (( new_moonraker_obico_count > allowed_moonraker_obico_count )) && error_msg "Number of Obico instances larger than installed Moonraker instances"
done && select_msg "${new_moonraker_obico_count}"
else
log_error "Internal error. moonraker_count of '${moonraker_count}' not equal or grather than one!"
@@ -160,8 +159,8 @@ function moonraker_obico_setup_dialog() {
### Step 2: Confirm instance amount
local yn
while true; do
- (( new_moonraker_obico_count == 1 )) && local question="Install Moonraker-obico?"
- (( new_moonraker_obico_count > 1 )) && local question="Install ${new_moonraker_obico_count} Moonraker-obico instances?"
+ (( new_moonraker_obico_count == 1 )) && local question="Install Obico?"
+ (( new_moonraker_obico_count > 1 )) && local question="Install ${new_moonraker_obico_count} Obico instances?"
read -p "${cyan}###### ${question} (Y/n):${white} " yn
case "${yn}" in
Y|y|Yes|yes|"")
@@ -169,7 +168,7 @@ function moonraker_obico_setup_dialog() {
break;;
N|n|No|no)
select_msg "No"
- abort_msg "Exiting Moonraker-obico setup ...\n"
+ abort_msg "Exiting Obico setup ...\n"
return;;
*)
error_msg "Invalid Input!";;
@@ -191,8 +190,8 @@ function moonraker_obico_setup_dialog() {
fi
done
- (( new_moonraker_obico_count > 1 )) && status_msg "Installing ${new_moonraker_obico_count} Moonraker-obico instances ..."
- (( new_moonraker_obico_count == 1 )) && status_msg "Installing Moonraker-obico ..."
+ (( new_moonraker_obico_count > 1 )) && status_msg "Installing ${new_moonraker_obico_count} Obico instances ..."
+ (( new_moonraker_obico_count == 1 )) && status_msg "Installing Obico ..."
### Step 5: Clone the moonraker-obico repo
clone_moonraker_obico "${MOONRAKER_OBICO_REPO}"
@@ -244,9 +243,9 @@ function moonraker_obico_setup_dialog() {
if (( ${#not_linked_instances[@]} > 0 )); then
top_border
if (( moonraker_count == 1 )); then
- printf "|${green}%-55s${white}|\n" " Moonraker-obico not linked to the server!"
+ printf "|${green}%-55s${white}|\n" " Obico not linked to the server!"
else
- printf "|${green}%-55s${white}|\n" " ${#not_linked_instances[@]} Moonraker-obico instances not linked to the server!"
+ printf "|${green}%-55s${white}|\n" " ${#not_linked_instances[@]} Obico instances not linked to the server!"
for i in "${not_linked_instances[@]}"; do
printf "|${cyan}%-57s${white}|\n" " ● moonraker-obico-${moonraker_names[${i}]}"
done
@@ -272,7 +271,7 @@ function moonraker_obico_setup_dialog() {
break;;
N|n|No|no)
select_msg "No"
- abort_msg "Exiting Moonraker-obico setup ...\n"
+ abort_msg "Exiting Obico setup ...\n"
return;;
*)
error_msg "Invalid Input!";;
@@ -295,13 +294,13 @@ function moonraker_obico_setup_dialog() {
function clone_moonraker_obico() {
local repo=${1}
- status_msg "Cloning Moonraker-obico from ${repo} ..."
- ### force remove existing Moonraker-obico dir
+ status_msg "Cloning Obico from ${repo} ..."
+ ### force remove existing Obico dir
[[ -d "${MOONRAKER_OBICO_DIR}" ]] && rm -rf "${MOONRAKER_OBICO_DIR}"
cd "${HOME}" || exit 1
if ! git clone "${repo}" "${MOONRAKER_OBICO_DIR}"; then
- print_error "Cloning Moonraker-obico from\n ${repo}\n failed!"
+ print_error "Cloning Obico from\n ${repo}\n failed!"
exit 1
fi
}
@@ -316,7 +315,7 @@ function moonraker_obico_install() {
function remove_moonraker_obico_systemd() {
[[ -z $(moonraker_obico_systemd) ]] && return
- status_msg "Removing Moonraker-obico Systemd Services ..."
+ status_msg "Removing Obico Systemd Services ..."
for service in $(moonraker_obico_systemd | cut -d"/" -f5); do
status_msg "Removing ${service} ..."
@@ -329,7 +328,7 @@ function remove_moonraker_obico_systemd() {
### reloading units
sudo systemctl daemon-reload
sudo systemctl reset-failed
- ok_msg "Moonraker-obico Services removed!"
+ ok_msg "Obico Services removed!"
}
function remove_moonraker_obico_logs() {
@@ -361,7 +360,7 @@ function remove_legacy_moonraker_obico_logs() {
function remove_moonraker_obico_dir() {
[[ ! -d ${MOONRAKER_OBICO_DIR} ]] && return
- status_msg "Removing Moonraker-obico directory ..."
+ status_msg "Removing Obico directory ..."
rm -rf "${MOONRAKER_OBICO_DIR}"
ok_msg "Directory removed!"
}
@@ -380,7 +379,7 @@ function remove_moonraker_obico() {
remove_moonraker_obico_dir
remove_moonraker_obico_env
- print_confirm "Moonraker-obico was successfully removed!"
+ print_confirm "Obico was successfully removed!"
return
}
@@ -394,7 +393,7 @@ function update_moonraker_obico() {
if [[ ! -d ${MOONRAKER_OBICO_DIR} ]]; then
clone_moonraker_obico "${MOONRAKER_OBICO_REPO}"
else
- status_msg "Updating Moonraker-obico ..."
+ status_msg "Updating Obico ..."
cd "${MOONRAKER_OBICO_DIR}" && git pull
fi
diff --git a/scripts/ui/main_menu.sh b/scripts/ui/main_menu.sh
index 07cc5ab..f6d7cc8 100755
--- a/scripts/ui/main_menu.sh
+++ b/scripts/ui/main_menu.sh
@@ -57,7 +57,7 @@ function print_status() {
elif [[ ${status} == "Incomplete!" ]]; then
status="${yellow}${status}${white}"
elif [[ ${status} == "Not linked!" ]]; then
- ### "Not linked!" is only required for Moonraker-obico
+ ### "Not linked!" is only required for Obico for Klipper
status="${yellow}${status}${white}"
else
status="${green}${status}${white}"
From ae9d1b98da8a08a6b0cb9c469bbf88048f4ecad8 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Sun, 1 Oct 2023 18:30:01 +0200
Subject: [PATCH 06/25] feat(klipper): remove/disable brltty and ModemManager
during installation (#387)
---
scripts/klipper.sh | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/scripts/klipper.sh b/scripts/klipper.sh
index d5d5469..8406b5c 100644
--- a/scripts/klipper.sh
+++ b/scripts/klipper.sh
@@ -244,6 +244,7 @@ function run_klipper_setup() {
### finalizing the setup with writing instance names to the kiauh.ini
set_multi_instance_names
+ remove_disrupting_packages
print_confirm "${confirm}" && return
}
@@ -625,3 +626,27 @@ function get_klipper_python_ver() {
version=$("${KLIPPY_ENV}"/bin/python --version 2>&1 | cut -d" " -f2 | cut -d"." -f1)
echo "${version}"
}
+
+function remove_disrupting_packages() {
+ local brltty="false"
+ local modem_manager="false"
+
+ ### check system for installed brltty
+ [[ $(dpkg -s brltty 2>/dev/null | grep "Status") = *\ installed ]] && brltty="true"
+ ### check system for an installed haproxy service
+ [[ $(dpkg -s ModemManager 2>/dev/null | grep "Status") = *\ installed ]] && modem_manager="true"
+
+ status_msg "Installed brltty package detected, removing brltty ..."
+ if [[ ${brltty} == "true" ]]; then
+ sudo systemctl stop brltty
+ sudo apt-get remove brltty -y
+ fi
+ ok_msg "brltty removed!"
+
+ status_msg "Installed ModemManager package detected, disabling ModemManager service ..."
+ if [[ ${modem_manager} == "true" ]]; then
+ sudo systemctl stop ModemManager
+ sudo systemctl disable ModemManager
+ fi
+ ok_msg "ModemManager service disabled!"
+}
From 5cf4b018fcdfa4dc953b4a003a505d439aba7ee6 Mon Sep 17 00:00:00 2001
From: Kenneth Jiang
Date: Thu, 12 Oct 2023 11:26:30 -0700
Subject: [PATCH 07/25] refactor: change wording now that moonraker-obico can
link printer using auto-discovery (#389)
---
scripts/obico.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/scripts/obico.sh b/scripts/obico.sh
index eeca2c9..f8bef57 100644
--- a/scripts/obico.sh
+++ b/scripts/obico.sh
@@ -251,9 +251,8 @@ function moonraker_obico_setup_dialog() {
done
fi
blank_line
- echo -e "| To link to your Obico Server account, you need to |"
- echo -e "| obtain the 6-digit verification code in the Obico |"
- echo -e "| mobile or web app. For more information, visit: |"
+ echo -e "| It will take only 10 seconds to link printer to Obico.|"
+ echo -e "| For more information, visit: |"
echo -e "| https://www.obico.io/docs/user-guides/klipper-setup/ |"
blank_line
echo -e "| If you don't want to link the printer now, you can |"
From 899b204dc746b16055d00faa633cbf4a8b8a3bf3 Mon Sep 17 00:00:00 2001
From: Sineos
Date: Sun, 15 Oct 2023 10:08:41 +0200
Subject: [PATCH 08/25] refactor: show full path of mcu (#391)
---
scripts/flash_klipper.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/flash_klipper.sh b/scripts/flash_klipper.sh
index 437b7af..c8e5673 100644
--- a/scripts/flash_klipper.sh
+++ b/scripts/flash_klipper.sh
@@ -112,7 +112,6 @@ function print_detected_mcu_to_screen() {
fi
for mcu in "${mcu_list[@]}"; do
- mcu=$(echo "${mcu}" | rev | cut -d"/" -f1 | rev)
echo -e " ● MCU #${i}: ${cyan}${mcu}${white}"
i=$(( i + 1 ))
done
From 25dfbb83df66075ca6cfb1973da3ad2e66415944 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Sat, 28 Oct 2023 20:48:57 +0200
Subject: [PATCH 09/25] fix(kiauh): display custom repo dialog again after user
interaction
fix #394
Signed-off-by: Dominik Willner
---
scripts/switch_klipper_repo.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/switch_klipper_repo.sh b/scripts/switch_klipper_repo.sh
index 47a6d9d..9570547 100644
--- a/scripts/switch_klipper_repo.sh
+++ b/scripts/switch_klipper_repo.sh
@@ -77,10 +77,12 @@ function change_klipper_repo_menu() {
error_msg "Invalid command!";;
esac
done
+ break
else
status_msg "Set custom Klipper repository to:\n ● Repository: ${repos[${option}]}\n ● Branch: ${branches[${option}]}"
set_custom_klipper_repo "${repos[${option}]}" "${branches[${option}]}"
ok_msg "This repo will now be used for new Klipper installations!\n"
+ break
fi
elif [[ ${option} =~ ${back} ]]; then
From 6fcd7a3f0854588667596c8c1f44a211b10ca60d Mon Sep 17 00:00:00 2001
From: dw-0
Date: Tue, 31 Oct 2023 15:08:59 +0100
Subject: [PATCH 10/25] refactor(klipper): improve disruptive package handling
fix #293
Signed-off-by: Dominik Willner
---
scripts/klipper.sh | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/scripts/klipper.sh b/scripts/klipper.sh
index 8406b5c..93a43d6 100644
--- a/scripts/klipper.sh
+++ b/scripts/klipper.sh
@@ -244,7 +244,7 @@ function run_klipper_setup() {
### finalizing the setup with writing instance names to the kiauh.ini
set_multi_instance_names
- remove_disrupting_packages
+ mask_disrupting_services
print_confirm "${confirm}" && return
}
@@ -627,26 +627,33 @@ function get_klipper_python_ver() {
echo "${version}"
}
-function remove_disrupting_packages() {
+function mask_disrupting_services() {
local brltty="false"
+ local brltty_udev="false"
local modem_manager="false"
- ### check system for installed brltty
[[ $(dpkg -s brltty 2>/dev/null | grep "Status") = *\ installed ]] && brltty="true"
- ### check system for an installed haproxy service
+ [[ $(dpkg -s brltty-udev 2>/dev/null | grep "Status") = *\ installed ]] && brltty_udev="true"
[[ $(dpkg -s ModemManager 2>/dev/null | grep "Status") = *\ installed ]] && modem_manager="true"
- status_msg "Installed brltty package detected, removing brltty ..."
+ status_msg "Installed brltty package detected, masking brltty service ..."
if [[ ${brltty} == "true" ]]; then
sudo systemctl stop brltty
- sudo apt-get remove brltty -y
+ sudo systemctl mask brltty
fi
- ok_msg "brltty removed!"
+ ok_msg "brltty service masked!"
- status_msg "Installed ModemManager package detected, disabling ModemManager service ..."
+ status_msg "Installed brltty-udev package detected, masking brltty-udev service ..."
+ if [[ ${brltty_udev} == "true" ]]; then
+ sudo systemctl stop brltty-udev
+ sudo systemctl mask brltty-udev
+ fi
+ ok_msg "brltty-udev service masked!"
+
+ status_msg "Installed ModemManager package detected, masking ModemManager service ..."
if [[ ${modem_manager} == "true" ]]; then
sudo systemctl stop ModemManager
- sudo systemctl disable ModemManager
+ sudo systemctl mask ModemManager
fi
- ok_msg "ModemManager service disabled!"
+ ok_msg "ModemManager service masked!"
}
From b2567995dedc15406d1da7608c5c397e02351ac3 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Sun, 10 Dec 2023 15:12:28 +0100
Subject: [PATCH 11/25] feat(klipper): add virtual_sd_card_block to example
printer.cfg (#411)
---
resources/example.printer.cfg | 6 +++++-
scripts/klipper.sh | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/resources/example.printer.cfg b/resources/example.printer.cfg
index 216081b..1f68cc7 100644
--- a/resources/example.printer.cfg
+++ b/resources/example.printer.cfg
@@ -1,7 +1,11 @@
[mcu]
serial: /dev/serial/by-id/
+[virtual_sd_card]
+path: %GCODES_DIR%
+on_error_gcode: CANCEL_PRINT
+
[printer]
kinematics: none
max_velocity: 1000
-max_accel: 1000
\ No newline at end of file
+max_accel: 1000
diff --git a/scripts/klipper.sh b/scripts/klipper.sh
index 93a43d6..707c3b9 100644
--- a/scripts/klipper.sh
+++ b/scripts/klipper.sh
@@ -334,6 +334,7 @@ function create_klipper_service() {
local printer_data
local cfg_dir
+ local gcodes_dir
local cfg
local log
local klippy_serial
@@ -346,6 +347,7 @@ function create_klipper_service() {
printer_data="${HOME}/${instance_name}_data"
cfg_dir="${printer_data}/config"
+ gcodes_dir="${printer_data}/gcodes"
cfg="${cfg_dir}/printer.cfg"
log="${printer_data}/logs/klippy.log"
klippy_serial="${printer_data}/comms/klippy.serial"
@@ -376,18 +378,20 @@ function create_klipper_service() {
fi
if [[ ! -f ${cfg} ]]; then
- write_example_printer_cfg "${cfg}"
+ write_example_printer_cfg "${cfg}" "${gcodes_dir}"
fi
}
function write_example_printer_cfg() {
local cfg=${1}
+ local gcodes_dir=${2}
local cfg_template
cfg_template="${KIAUH_SRCDIR}/resources/example.printer.cfg"
status_msg "Creating minimal example printer.cfg ..."
if cp "${cfg_template}" "${cfg}"; then
+ sed -i "s|%GCODES_DIR%|${gcodes_dir}|" "${cfg}"
ok_msg "Minimal example printer.cfg created!"
else
error_msg "Couldn't create minimal example printer.cfg!"
From 30bc56b1982db315ea1edd27d953f10dbe7734f6 Mon Sep 17 00:00:00 2001
From: CODeRUS
Date: Sun, 10 Dec 2023 16:57:59 +0100
Subject: [PATCH 12/25] feat(advanced): add selection between flash/serialflash
methods (#410)
---
scripts/flash_klipper.sh | 79 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 75 insertions(+), 4 deletions(-)
diff --git a/scripts/flash_klipper.sh b/scripts/flash_klipper.sh
index c8e5673..31b313c 100644
--- a/scripts/flash_klipper.sh
+++ b/scripts/flash_klipper.sh
@@ -52,16 +52,57 @@ function init_flash_process() {
esac
done
- ### step 2: select how the mcu is connected to the host
+ ### step 2: select how the mcu is flashed (flash/serialflash)
+ select_flash_command
+
+ ### step 3: select how the mcu is connected to the host
select_mcu_connection
- ### step 3: select which detected mcu should be flashed
+ ### step 4: select which detected mcu should be flashed
select_mcu_id "${method}"
}
#================================================#
#=================== STEP 2 =====================#
#================================================#
+function select_flash_command() {
+ unset flash_command
+
+ top_border
+ echo -e "| How to flash MCU? |"
+ echo -e "| 1) make flash (default) |"
+ echo -e "| 2) make serialflash (stm32flash) |"
+ blank_line
+ back_help_footer
+
+ local choice
+ while true; do
+ read -p "${cyan}###### Flashing command:${white} " -i "1" -e choice
+ case "${choice}" in
+ 1)
+ select_msg "Selected 'make flash' command"
+ flash_command="flash"
+ break;;
+ 2)
+ select_msg "Selected 'make serialflash' command"
+ flash_command="serialflash"
+ break;;
+ B|b)
+ advanced_menu
+ break;;
+ H|h)
+ clear && print_header
+ show_mcu_flash_command_help
+ break;;
+ *)
+ error_msg "Invalid command!";;
+ esac
+ done
+}
+
+#================================================#
+#=================== STEP 3 =====================#
+#================================================#
function select_mcu_connection() {
top_border
echo -e "| ${yellow}Make sure that the controller board is connected now!${white} |"
@@ -119,7 +160,7 @@ function print_detected_mcu_to_screen() {
}
#================================================#
-#=================== STEP 3 =====================#
+#=================== STEP 4 =====================#
#================================================#
function select_mcu_id() {
local i=0 sel_index=0 method=${1}
@@ -194,7 +235,7 @@ function start_flash_mcu() {
local device=${1}
do_action_service "stop" "klipper"
- if make flash FLASH_DEVICE="${device}"; then
+ if make ${flash_command} FLASH_DEVICE="${device}"; then
ok_msg "Flashing successfull!"
else
warn_msg "Flashing failed!"
@@ -386,6 +427,36 @@ function show_flash_method_help() {
done
}
+function show_mcu_flash_command_help() {
+ top_border
+ echo -e "| ~~~~~~~~ < ? > Help: Flash MCU < ? > ~~~~~~~~ |"
+ hr
+ echo -e "| ${cyan}make flash:${white} |"
+ echo -e "| The default command to flash controller board, it |"
+ echo -e "| will detect selected microcontroller and use suitable |"
+ echo -e "| tool for flashing it. |"
+ blank_line
+ echo -e "| ${cyan}make serialflash:${white} |"
+ echo -e "| Special command to flash STM32 microcontrollers in |"
+ echo -e "| DFU mode but connected via serial. stm32flash command |"
+ echo -e "| will be used internally. |"
+ blank_line
+ back_footer
+
+ local choice
+ while true; do
+ read -p "${cyan}###### Please select:${white} " choice
+ case "${choice}" in
+ B|b)
+ clear && print_header
+ select_flash_command
+ break;;
+ *)
+ error_msg "Invalid command!";;
+ esac
+ done
+}
+
function show_mcu_connection_help() {
top_border
echo -e "| ~~~~~~~~ < ? > Help: Flash MCU < ? > ~~~~~~~~ |"
From 7a9e752f9ca3297fbca311d5fbb1d95da3093cac Mon Sep 17 00:00:00 2001
From: Stefan Dej
Date: Tue, 12 Dec 2023 08:21:51 +0100
Subject: [PATCH 13/25] fix: fix typo in example.printer.cfg (#412)
rename virtual_sd_card to virtual_sdcard
Signed-off-by: Stefan Dej
---
resources/example.printer.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/example.printer.cfg b/resources/example.printer.cfg
index 1f68cc7..88fe7df 100644
--- a/resources/example.printer.cfg
+++ b/resources/example.printer.cfg
@@ -1,7 +1,7 @@
[mcu]
serial: /dev/serial/by-id/
-[virtual_sd_card]
+[virtual_sdcard]
path: %GCODES_DIR%
on_error_gcode: CANCEL_PRINT
From f5eb9486cc17863af202d693afc7c8e3d9650517 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Sun, 17 Dec 2023 12:10:36 +0100
Subject: [PATCH 14/25] refactor(kiauh): use `sudo true` instead of `sudo -v`
to prevent password prompts
Fixes #395
Signed-off-by: Dominik Willner
---
scripts/ui/install_menu.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/ui/install_menu.sh b/scripts/ui/install_menu.sh
index 5bee336..5c4b625 100755
--- a/scripts/ui/install_menu.sh
+++ b/scripts/ui/install_menu.sh
@@ -35,7 +35,7 @@ function install_ui() {
}
function install_menu() {
- clear -x && sudo -v && clear -x # (re)cache sudo credentials so password prompt doesn't bork ui
+ clear -x && sudo true && clear -x # (re)cache sudo credentials so password prompt doesn't bork ui
print_header
install_ui
From 5ebe9411251b3f0b2688831e185b209c56ed644e Mon Sep 17 00:00:00 2001
From: dw-0
Date: Sun, 17 Dec 2023 12:18:04 +0100
Subject: [PATCH 15/25] readme: don't recommend a specific architecture anymore
Fixes #403
Both 32bit and 64bit images were reported to work fine. So we don't need a strict 32bit recommendation anymore which may confuses users, why they should pick 32bit over 64bit.
Signed-off-by: Dominik Willner
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index e3f6acc..ae4edf4 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@
### 📋 Prerequisites
KIAUH is a script that assists you in installing Klipper on a Linux operating system that has
already been flashed to your Raspberry Pi's (or other SBC's) SD card. As a result, you must ensure
-that you have a functional Linux system on hand. `Raspberry Pi OS Lite (32bit)` is a recommended Linux image
+that you have a functional Linux system on hand. `Raspberry Pi OS Lite (either 32bit or 64bit)` is a recommended Linux image
if you are using a Raspberry Pi. The [official Raspberry Pi Imager](https://www.raspberrypi.com/software/)
is the simplest way to flash an image like this to an SD card.
@@ -39,7 +39,7 @@ select `Choose OS -> Raspberry Pi OS (other)`: \
-* Then select `Raspberry Pi OS Lite (32bit)`:
+* Then select `Raspberry Pi OS Lite (32bit)` (or 64bit if you want to use that instead):
From 3f5ff50d697a4f5c96198397fb67a1926e675a36 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Mon, 1 Jan 2024 19:51:56 +0100
Subject: [PATCH 16/25] refactor(kiauh): use `sudo true` instead of `sudo -v`
to prevent password prompts
Signed-off-by: Dominik Willner
---
scripts/ui/update_menu.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/ui/update_menu.sh b/scripts/ui/update_menu.sh
index eab946c..4571cfb 100755
--- a/scripts/ui/update_menu.sh
+++ b/scripts/ui/update_menu.sh
@@ -41,7 +41,7 @@ function update_ui() {
}
function update_menu() {
- clear -x && sudo -v && clear -x # (re)cache sudo credentials so password prompt doesn't bork ui
+ clear -x && sudo true && clear -x # (re)cache sudo credentials so password prompt doesn't bork ui
do_action "" "update_ui"
local action
From 061e22266426af74c307b4f4beb589449506cc83 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Mon, 1 Jan 2024 19:54:13 +0100
Subject: [PATCH 17/25] chore(kiauh): update copyright
Signed-off-by: Dominik Willner
---
kiauh.sh | 2 +-
scripts/backup.sh | 2 +-
scripts/crowsnest.sh | 2 +-
scripts/flash_klipper.sh | 2 +-
scripts/fluidd.sh | 2 +-
scripts/gcode_shell_command.sh | 2 +-
scripts/globals.sh | 2 +-
scripts/klipper.sh | 2 +-
scripts/klipperscreen.sh | 2 +-
scripts/mainsail.sh | 2 +-
scripts/mjpg-streamer.sh | 2 +-
scripts/mobileraker.sh | 2 +-
scripts/moonraker-telegram-bot.sh | 2 +-
scripts/moonraker.sh | 2 +-
scripts/nginx.sh | 2 +-
scripts/obico.sh | 2 +-
scripts/octoeverywhere.sh | 2 +-
scripts/octoprint.sh | 2 +-
scripts/pretty_gcode.sh | 2 +-
scripts/rollback.sh | 2 +-
scripts/switch_klipper_repo.sh | 2 +-
scripts/ui/advanced_menu.sh | 2 +-
scripts/ui/backup_menu.sh | 2 +-
scripts/ui/general_ui.sh | 2 +-
scripts/ui/install_menu.sh | 2 +-
scripts/ui/main_menu.sh | 2 +-
scripts/ui/remove_menu.sh | 2 +-
scripts/ui/settings_menu.sh | 2 +-
scripts/ui/update_menu.sh | 2 +-
scripts/upload_log.sh | 2 +-
scripts/utilities.sh | 2 +-
31 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/kiauh.sh b/kiauh.sh
index aac5a8e..ad54475 100755
--- a/kiauh.sh
+++ b/kiauh.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/backup.sh b/scripts/backup.sh
index d3baa02..9c55bb6 100755
--- a/scripts/backup.sh
+++ b/scripts/backup.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/crowsnest.sh b/scripts/crowsnest.sh
index b97d86f..0ec857e 100644
--- a/scripts/crowsnest.sh
+++ b/scripts/crowsnest.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/flash_klipper.sh b/scripts/flash_klipper.sh
index 31b313c..4fd4f45 100644
--- a/scripts/flash_klipper.sh
+++ b/scripts/flash_klipper.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/fluidd.sh b/scripts/fluidd.sh
index e67b7a6..accbcb1 100644
--- a/scripts/fluidd.sh
+++ b/scripts/fluidd.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/gcode_shell_command.sh b/scripts/gcode_shell_command.sh
index a512b4f..ff804d3 100644
--- a/scripts/gcode_shell_command.sh
+++ b/scripts/gcode_shell_command.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/globals.sh b/scripts/globals.sh
index f149f13..1c5fc4c 100644
--- a/scripts/globals.sh
+++ b/scripts/globals.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/klipper.sh b/scripts/klipper.sh
index 707c3b9..117caef 100644
--- a/scripts/klipper.sh
+++ b/scripts/klipper.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/klipperscreen.sh b/scripts/klipperscreen.sh
index 21b7f3b..9701e7c 100644
--- a/scripts/klipperscreen.sh
+++ b/scripts/klipperscreen.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/mainsail.sh b/scripts/mainsail.sh
index 34cff43..9182c6c 100644
--- a/scripts/mainsail.sh
+++ b/scripts/mainsail.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/mjpg-streamer.sh b/scripts/mjpg-streamer.sh
index f139b96..26168dc 100644
--- a/scripts/mjpg-streamer.sh
+++ b/scripts/mjpg-streamer.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/mobileraker.sh b/scripts/mobileraker.sh
index fa4ff60..30762c3 100644
--- a/scripts/mobileraker.sh
+++ b/scripts/mobileraker.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/moonraker-telegram-bot.sh b/scripts/moonraker-telegram-bot.sh
index b706afa..06cf22b 100644
--- a/scripts/moonraker-telegram-bot.sh
+++ b/scripts/moonraker-telegram-bot.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/moonraker.sh b/scripts/moonraker.sh
index 210d553..8ef046e 100644
--- a/scripts/moonraker.sh
+++ b/scripts/moonraker.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/nginx.sh b/scripts/nginx.sh
index f00b28e..9b80d68 100644
--- a/scripts/nginx.sh
+++ b/scripts/nginx.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/obico.sh b/scripts/obico.sh
index f8bef57..bd6a1cd 100644
--- a/scripts/obico.sh
+++ b/scripts/obico.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/octoeverywhere.sh b/scripts/octoeverywhere.sh
index d8945f0..49a0f96 100644
--- a/scripts/octoeverywhere.sh
+++ b/scripts/octoeverywhere.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/octoprint.sh b/scripts/octoprint.sh
index ecdd874..40640ff 100644
--- a/scripts/octoprint.sh
+++ b/scripts/octoprint.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/pretty_gcode.sh b/scripts/pretty_gcode.sh
index b9a334a..a3e1130 100644
--- a/scripts/pretty_gcode.sh
+++ b/scripts/pretty_gcode.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/rollback.sh b/scripts/rollback.sh
index 9b3038d..8cf837d 100755
--- a/scripts/rollback.sh
+++ b/scripts/rollback.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/switch_klipper_repo.sh b/scripts/switch_klipper_repo.sh
index 9570547..7f224c2 100644
--- a/scripts/switch_klipper_repo.sh
+++ b/scripts/switch_klipper_repo.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/ui/advanced_menu.sh b/scripts/ui/advanced_menu.sh
index 74bdfd0..12923e5 100755
--- a/scripts/ui/advanced_menu.sh
+++ b/scripts/ui/advanced_menu.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/ui/backup_menu.sh b/scripts/ui/backup_menu.sh
index 97bae83..c56ed02 100755
--- a/scripts/ui/backup_menu.sh
+++ b/scripts/ui/backup_menu.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/ui/general_ui.sh b/scripts/ui/general_ui.sh
index b688ae7..2abf794 100755
--- a/scripts/ui/general_ui.sh
+++ b/scripts/ui/general_ui.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/ui/install_menu.sh b/scripts/ui/install_menu.sh
index 5c4b625..d318d8d 100755
--- a/scripts/ui/install_menu.sh
+++ b/scripts/ui/install_menu.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/ui/main_menu.sh b/scripts/ui/main_menu.sh
index f6d7cc8..e521ba3 100755
--- a/scripts/ui/main_menu.sh
+++ b/scripts/ui/main_menu.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/ui/remove_menu.sh b/scripts/ui/remove_menu.sh
index 4a9485e..ef111b0 100755
--- a/scripts/ui/remove_menu.sh
+++ b/scripts/ui/remove_menu.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/ui/settings_menu.sh b/scripts/ui/settings_menu.sh
index 117eb76..0cf4835 100755
--- a/scripts/ui/settings_menu.sh
+++ b/scripts/ui/settings_menu.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/ui/update_menu.sh b/scripts/ui/update_menu.sh
index 4571cfb..cf2bbdc 100755
--- a/scripts/ui/update_menu.sh
+++ b/scripts/ui/update_menu.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/upload_log.sh b/scripts/upload_log.sh
index 9772524..97f2e88 100755
--- a/scripts/upload_log.sh
+++ b/scripts/upload_log.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
diff --git a/scripts/utilities.sh b/scripts/utilities.sh
index d95647c..ef72b8b 100644
--- a/scripts/utilities.sh
+++ b/scripts/utilities.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#=======================================================================#
-# Copyright (C) 2020 - 2023 Dominik Willner #
+# Copyright (C) 2020 - 2024 Dominik Willner #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
From 397038e43ef32a05702bd9fb0afbf7e2f31d5d64 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Mon, 1 Jan 2024 19:55:47 +0100
Subject: [PATCH 18/25] chore(kiauh): add .idea to .gitignore
Signed-off-by: Dominik Willner
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 560b8c5..ce8ca81 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.idea
.vscode
*.code-workspace
klipper_repos.txt
From 095823bf288029a2d8e147c275b0c3b8549edd57 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Mon, 1 Jan 2024 20:02:29 +0100
Subject: [PATCH 19/25] chore(kiauh): update FUNDING.yml
Signed-off-by: Dominik Willner
---
.github/FUNDING.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index a79b3ac..7aa43b8 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
-custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+custom: https://paypal.me/dwillner0
From 8f960495baed6c5916b4896819a1272a42092293 Mon Sep 17 00:00:00 2001
From: jneilliii
Date: Mon, 22 Jan 2024 11:57:37 -0500
Subject: [PATCH 20/25] fix: OctoPrint logo in README.md (#423)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index ae4edf4..adbf756 100644
--- a/README.md
+++ b/README.md
@@ -125,7 +125,7 @@ prompt and confirm by hitting ENTER.
 |
 |
- |
+ |
| by fluidd-core |
From 8e7d4db9889aac408f86b37bb93425f166a7725b Mon Sep 17 00:00:00 2001
From: Anna <16231288+HumbleDeer@users.noreply.github.com>
Date: Tue, 23 Jan 2024 22:47:37 +0100
Subject: [PATCH 21/25] fix: OctoPrint logo in README.md (#424)
* Fix OctoPrint logo in Readme
Fixed the broken link to the OctoPrint logo in the Readme under the Sources section. Now uses the logo present in the octoprint docs directory.
* Update OctoPrint logo to "raw" cdn link
* Changed ?raw=true link to raw.githubusercontent.com
---------
Co-authored-by: dw-0
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index adbf756..5928f67 100644
--- a/README.md
+++ b/README.md
@@ -125,7 +125,7 @@ prompt and confirm by hitting ENTER.
 |
 |
- |
+ |
| by fluidd-core |
From ba1cdb37395dd0db2a752f68436e929c27c6ea55 Mon Sep 17 00:00:00 2001
From: Patrick Schmidt
Date: Mon, 29 Jan 2024 17:09:30 +0100
Subject: [PATCH 22/25] refactor(Mobileraker): update companion install script
(#431)
---
scripts/mobileraker.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/mobileraker.sh b/scripts/mobileraker.sh
index 30762c3..39445a0 100644
--- a/scripts/mobileraker.sh
+++ b/scripts/mobileraker.sh
@@ -61,8 +61,8 @@ function mobileraker_setup() {
exit 1
fi
- status_msg "Installing Mobileraker's companion ..."
- if "${MOBILERAKER_DIR}"/scripts/install-mobileraker-companion.sh; then
+ status_msg "Starting installer of Mobileraker's companion ..."
+ if "${MOBILERAKER_DIR}"/scripts/install.sh; then
ok_msg "Mobileraker's companion successfully installed!"
else
print_error "Mobileraker's companion installation failed!"
@@ -233,7 +233,7 @@ primary_branch:main
managed_services: mobileraker
env: ${HOME}/mobileraker-env/bin/python
requirements: scripts/mobileraker-requirements.txt
-install_script: scripts/install-mobileraker-companion.sh
+install_script: scripts/install.sh
MOONRAKER_CONF
fi
From 099d47df2f26ecef41135cb544eafd66b5f8e4f3 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Mon, 29 Jan 2024 17:17:09 +0100
Subject: [PATCH 23/25] fix: revert "refactor(Mobileraker): update companion
install script (#431)" (#432)
This reverts commit ba1cdb37395dd0db2a752f68436e929c27c6ea55.
---
scripts/mobileraker.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/mobileraker.sh b/scripts/mobileraker.sh
index 39445a0..30762c3 100644
--- a/scripts/mobileraker.sh
+++ b/scripts/mobileraker.sh
@@ -61,8 +61,8 @@ function mobileraker_setup() {
exit 1
fi
- status_msg "Starting installer of Mobileraker's companion ..."
- if "${MOBILERAKER_DIR}"/scripts/install.sh; then
+ status_msg "Installing Mobileraker's companion ..."
+ if "${MOBILERAKER_DIR}"/scripts/install-mobileraker-companion.sh; then
ok_msg "Mobileraker's companion successfully installed!"
else
print_error "Mobileraker's companion installation failed!"
@@ -233,7 +233,7 @@ primary_branch:main
managed_services: mobileraker
env: ${HOME}/mobileraker-env/bin/python
requirements: scripts/mobileraker-requirements.txt
-install_script: scripts/install.sh
+install_script: scripts/install-mobileraker-companion.sh
MOONRAKER_CONF
fi
From b6c6edb6227a0828abe4ccd15640f895671ffd23 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Sat, 24 Feb 2024 14:53:41 +0100
Subject: [PATCH 24/25] refactor(Mobileraker): update companion install script
(#431) (#433)
---
scripts/mobileraker.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/mobileraker.sh b/scripts/mobileraker.sh
index 30762c3..39445a0 100644
--- a/scripts/mobileraker.sh
+++ b/scripts/mobileraker.sh
@@ -61,8 +61,8 @@ function mobileraker_setup() {
exit 1
fi
- status_msg "Installing Mobileraker's companion ..."
- if "${MOBILERAKER_DIR}"/scripts/install-mobileraker-companion.sh; then
+ status_msg "Starting installer of Mobileraker's companion ..."
+ if "${MOBILERAKER_DIR}"/scripts/install.sh; then
ok_msg "Mobileraker's companion successfully installed!"
else
print_error "Mobileraker's companion installation failed!"
@@ -233,7 +233,7 @@ primary_branch:main
managed_services: mobileraker
env: ${HOME}/mobileraker-env/bin/python
requirements: scripts/mobileraker-requirements.txt
-install_script: scripts/install-mobileraker-companion.sh
+install_script: scripts/install.sh
MOONRAKER_CONF
fi
From d800d356ca293dc685a5a3adc5963f929bdc9529 Mon Sep 17 00:00:00 2001
From: dw-0
Date: Sun, 24 Mar 2024 19:45:02 +0100
Subject: [PATCH 25/25] fix(backups): backup config folder only if it exists
Signed-off-by: Dominik Willner
---
scripts/backup.sh | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/scripts/backup.sh b/scripts/backup.sh
index 9c55bb6..091d99f 100755
--- a/scripts/backup.sh
+++ b/scripts/backup.sh
@@ -43,15 +43,17 @@ function backup_config_dir() {
local i=0 folder folder_name target_dir
for folder in ${config_pathes}; do
- status_msg "Create backup of ${folder} ..."
-
- folder_name=$(echo "${folder}" | rev | cut -d"/" -f2 | rev)
- target_dir="${BACKUP_DIR}/configs/${current_date}/${folder_name}"
- mkdir -p "${target_dir}"
- cp -r "${folder}" "${target_dir}"
- i=$(( i + 1 ))
-
- ok_msg "Backup created in:\n${target_dir}"
+ if [[ -d ${folder} ]]; then
+ status_msg "Create backup of ${folder} ..."
+
+ folder_name=$(echo "${folder}" | rev | cut -d"/" -f2 | rev)
+ target_dir="${BACKUP_DIR}/configs/${current_date}/${folder_name}"
+ mkdir -p "${target_dir}"
+ cp -r "${folder}" "${target_dir}"
+ i=$(( i + 1 ))
+
+ ok_msg "Backup created in:\n${target_dir}"
+ fi
done
else
ok_msg "No config directory found! Skipping backup ..."