feat: KIAUH v4.0.0 #191
@@ -22,7 +22,7 @@ function install_fluidd(){
|
||||
print_error "${error}" && return
|
||||
fi
|
||||
### checking dependencies
|
||||
local dep=(nginx)
|
||||
local dep=(wget nginx)
|
||||
dependency_check "${dep[@]}"
|
||||
### check if moonraker is already installed
|
||||
system_check_webui
|
||||
|
||||
@@ -116,7 +116,7 @@ function read_kiauh_ini(){
|
||||
|
|
||||
log_error "Reading from .kiauh.ini failed! File not found!"
|
||||
return 1
|
||||
fi
|
||||
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.
|
||||
log_info "Reading from .kiauh.ini ... (${func})"
|
||||
```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}"
|
||||
}
|
||||
|
||||
@@ -411,11 +411,6 @@ function dependency_check(){
|
||||
```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 system_check_webui(){
|
||||
### check system for an installed and enabled octoprint service
|
||||
```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 sudo systemctl list-unit-files | grep -E "octoprint.*" | grep "enabled" &>/dev/null; then
|
||||
```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.
|
||||
OCTOPRINT_ENABLED="true"
|
||||
```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.
|
||||
fi
|
||||
```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.
|
||||
### check system for an installed haproxy service
|
||||
if [[ $(dpkg-query -f'${Status}' --show haproxy 2>/dev/null) = *\ installed ]]; then
|
||||
HAPROXY_FOUND="true"
|
||||
@@ -433,13 +428,12 @@ function system_check_webui(){
|
||||
```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 fetch_webui_ports(){
|
||||
### read listen ports from possible installed interfaces
|
||||
```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.
|
||||
### and write them to ~/.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.
|
||||
WEBIFS=(mainsail fluidd octoprint)
|
||||
```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.
|
||||
for interface in "${WEBIFS[@]}"; do
|
||||
```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 ports from possible installed interfaces and write them to ~/.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.
|
||||
local interfaces=("mainsail" "fluidd" "octoprint")
|
||||
```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.
|
||||
for interface in "${interfaces[@]}"; do
|
||||
```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 "/etc/nginx/sites-available/${interface}" ]; then
|
||||
port=$(grep -E "listen" "/etc/nginx/sites-available/${interface}" | head -1 | sed 's/^\s*//' | sed 's/;$//' | cut -d" " -f2)
|
||||
if [ ! -n "$(grep -E "${interface}_port" "${INI_FILE}")" ]; then
|
||||
```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 ! grep -Eq "${interface}_port" "${INI_FILE}"; then
|
||||
```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.
|
||||
sed -i '$a'"${interface}_port=${port}" "${INI_FILE}"
|
||||
else
|
||||
sed -i "/^${interface}_port/d" "${INI_FILE}"
|
||||
@@ -481,10 +475,10 @@ function update_system(){
|
||||
```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 check_usergroups(){
|
||||
local group_dialout group_tty
|
||||
if grep -q "dialout" </etc/group && ! grep -q "dialout" <(groups "${USER}"); then
|
||||
group_dialout=false
|
||||
```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.
|
||||
group_dialout="false"
|
||||
```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.
|
||||
fi
|
||||
if grep -q "tty" </etc/group && ! grep -q "tty" <(groups "${USER}"); then
|
||||
group_tty=false
|
||||
```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.
|
||||
group_tty="false"
|
||||
```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.
|
||||
fi
|
||||
if [ "${group_dialout}" == "false" ] || [ "${group_tty}" == "false" ] ; then
|
||||
top_border
|
||||
|
||||
```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.