feat: KIAUH v4.0.0 #191
@@ -23,7 +23,7 @@ function check_for_backup_dir(){
|
||||
}
|
||||
|
||||
function backup_before_update(){
|
||||
read_kiauh_ini
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
# shellcheck disable=SC2154
|
||||
local state="${backup_before_update}"
|
||||
[ "${state}" = "false" ] && return
|
||||
|
||||
@@ -312,7 +312,7 @@ function get_fluidd_download_url() {
|
||||
stable_tag=$(echo "${tags}" | grep -E "^v([0-9]+\.?){3}$" | head -1)
|
||||
stable_url="https://github.com/fluidd-core/fluidd/releases/download/${stable_tag}/fluidd.zip"
|
||||
|
||||
read_kiauh_ini
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
if [ "${fluidd_install_unstable}" == "true" ]; then
|
||||
url="${latest_url}"
|
||||
echo "${url}"
|
||||
|
||||
@@ -134,7 +134,7 @@ function create_klipper_virtualenv(){
|
||||
}
|
||||
|
||||
function klipper_setup(){
|
||||
read_kiauh_ini
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
local custom_repo="${custom_klipper_repo}"
|
||||
local custom_branch="${custom_klipper_repo_branch}"
|
||||
local instances=${1} python_version=${2}
|
||||
@@ -427,7 +427,7 @@ function compare_klipper_versions(){
|
||||
|
||||
function get_klipper_cfg_dir() {
|
||||
local cfg_dir
|
||||
read_kiauh_ini
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
if [ -z "${custom_klipper_cfg_loc}" ]; then
|
||||
cfg_dir="${HOME}/klipper_config"
|
||||
else
|
||||
|
||||
@@ -428,7 +428,7 @@ function get_mainsail_download_url() {
|
||||
stable_tag=$(echo "${tags}" | grep -E "^v([0-9]+\.?){3}$" | head -1)
|
||||
stable_url="https://github.com/mainsail-crew/mainsail/releases/download/${stable_tag}/mainsail.zip"
|
||||
|
||||
read_kiauh_ini
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
if [ "${mainsail_install_unstable}" == "true" ]; then
|
||||
url="${latest_url}"
|
||||
echo "${url}"
|
||||
|
||||
@@ -83,7 +83,7 @@ function symlink_webui_nginx_log(){
|
||||
function match_nginx_configs(){
|
||||
local cfg_updated="false"
|
||||
### reinstall nginx configs if the amount of upstreams don't match anymore
|
||||
read_kiauh_ini
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
mainsail_nginx_cfg="/etc/nginx/sites-available/mainsail"
|
||||
fluidd_nginx_cfg="/etc/nginx/sites-available/fluidd"
|
||||
upstreams_webcams=$(grep -E "mjpgstreamer" /etc/nginx/conf.d/upstreams.conf | wc -l)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
|
||||
function settings_ui() {
|
||||
read_kiauh_ini
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
local custom_cfg_loc="${custom_klipper_cfg_loc}"
|
||||
local custom_repo="${custom_klipper_repo}"
|
||||
local custom_branch="${custom_klipper_repo_branch}"
|
||||
|
||||
@@ -33,7 +33,7 @@ function accept_upload_conditions(){
|
||||
}
|
||||
|
||||
function upload_selection(){
|
||||
read_kiauh_ini
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
local upload_agreed="${logupload_accepted}"
|
||||
[ "${upload_agreed}" = "false" ] && accept_upload_conditions
|
||||
|
||||
|
||||
@@ -99,12 +99,13 @@ function log_error() {
|
||||
|
|
||||
#================================================#
|
||||
|
||||
function read_kiauh_ini(){
|
||||
local func=${1}
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
if [ ! -f "${INI_FILE}" ]; then
|
||||
print_error "ERROR: File '~/.kiauh.ini' not found!"
|
||||
log_error "Reading from .kiauh.ini failed! File not found!"
|
||||
return 1
|
||||
fi
|
||||
log_info "Reading from .kiauh.ini"
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
log_info "${func}: reading from .kiauh.ini"
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
source "${INI_FILE}"
|
||||
}
|
||||
|
||||
@@ -287,7 +288,7 @@ function set_klipper_cfg_path(){
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
}
|
||||
|
||||
function switch_mainsail_releasetype() {
|
||||
read_kiauh_ini
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
local state="${mainsail_install_unstable}"
|
||||
if [ "${state}" == "false" ]; then
|
||||
sed -i '/mainsail_install_unstable=/s/false/true/' "${INI_FILE}"
|
||||
@@ -299,7 +300,7 @@ function switch_mainsail_releasetype() {
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
}
|
||||
|
||||
function switch_fluidd_releasetype() {
|
||||
read_kiauh_ini
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
local state="${fluidd_install_unstable}"
|
||||
if [ "${state}" == "false" ]; then
|
||||
sed -i '/fluidd_install_unstable=/s/false/true/' "${INI_FILE}"
|
||||
@@ -311,7 +312,7 @@ function switch_fluidd_releasetype() {
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
}
|
||||
|
||||
function toggle_backup_before_update(){
|
||||
read_kiauh_ini
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
local state="${backup_before_update}"
|
||||
if [ "${state}" = "false" ]; then
|
||||
sed -i '/backup_before_update=/s/false/true/' "${INI_FILE}"
|
||||
@@ -321,7 +322,7 @@ function toggle_backup_before_update(){
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
}
|
||||
|
||||
function set_custom_klipper_repo() {
|
||||
read_kiauh_ini
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
read_kiauh_ini "${FUNCNAME[0]}"
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
local repo_url=${1} branch=${2}
|
||||
sed -i "/^custom_klipper_repo=/d" "${INI_FILE}"
|
||||
sed -i '$a'"custom_klipper_repo=${repo_url}" "${INI_FILE}"
|
||||
|
||||
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
```suggestion
sudo cp "/etc/hosts" "/etc/hosts.${current_date}.bak"
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk. I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
```
###### Creating backup of hosts file ...
cp: missing destination file operand after '/etc/hosts /etc/hosts.220503-2314.bak'
Try 'cp --help' for more information.
```
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
Thank you! Yes that was indeed a typo and i just fixed it. Thank you! Yes that was indeed a typo and i just fixed it.
|
||||
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
I had to make this change in order to fix the error I got when I attempted to change the hostname (4/advanced, 7/change hostname from the menus) on armbian-22.05-trunk.
Thank you! Yes that was indeed a typo and i just fixed it.
Thank you! Yes that was indeed a typo and i just fixed it.