feat: KIAUH v4.0.0 #191
1
kiauh.sh
@@ -49,6 +49,7 @@ function kiauh_update_avail(){
|
||||
}
|
||||
|
||||
check_euid
|
||||
init_logfile
|
||||
set_globals
|
||||
init_ini
|
||||
kiauh_update_avail
|
||||
|
||||
@@ -25,14 +25,20 @@ function main_ui(){
|
||||
echo -e "| | KlipperScreen: $(klipperscreen_status)|"
|
||||
echo -e "| 6) [Settings] | Telegram Bot: $(get_telegram_bot_status)|"
|
||||
echo -e "| | |"
|
||||
echo -e "| $(get_kiauh_version)| Octoprint: $(octoprint_status)|"
|
||||
echo -e "| $(print_kiauh_version)| Octoprint: $(octoprint_status)|"
|
||||
quit_footer
|
||||
}
|
||||
|
||||
function get_kiauh_version(){
|
||||
local version
|
||||
cd "${SRCDIR}/kiauh"
|
||||
version="$(printf "%-20s" "$(git describe HEAD --always --tags | cut -d "-" -f 1,2)")"
|
||||
version="$(git describe HEAD --always --tags | cut -d "-" -f 1,2)"
|
||||
echo "${version}"
|
||||
}
|
||||
|
||||
function print_kiauh_version(){
|
||||
local version
|
||||
version="$(printf "%-20s" "$(get_kiauh_version)")"
|
||||
echo "${cyan}${version}${white}"
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,17 @@ function timestamp() {
|
||||
|
|
||||
date +"[%F %T]"
|
||||
}
|
||||
|
||||
function init_logfile() {
|
||||
```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 log="/tmp/kiauh.log"
|
||||
```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.
|
||||
{
|
||||
```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.
|
||||
echo -e "#================================================================#"
|
||||
```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.
|
||||
echo -e "# New KIAUH session started on: $(date) #"
|
||||
```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.
|
||||
echo -e "#================================================================#"
|
||||
```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.
|
||||
echo -e "KIAUH $(get_kiauh_version)"
|
||||
```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.
|
||||
echo -e "#================================================================#"
|
||||
```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}"
|
||||
```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.
|
||||
}
|
||||
```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.
|
||||
|
||||
```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.
|
||||
function log_info() {
|
||||
local message="${1}" log="${LOGFILE}"
|
||||
echo -e "$(timestamp) <INFO> ${message}" | tr -s " " >> "${log}"
|
||||
|
||||
```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.