mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-13 10:34:28 +05:00
fix: cleanup
This commit is contained in:
@@ -13,8 +13,6 @@ install_klipper(){
|
|||||||
get_user_selections_klipper(){
|
get_user_selections_klipper(){
|
||||||
status_msg "Initializing Klipper installation ..."
|
status_msg "Initializing Klipper installation ..."
|
||||||
#let user choose to install systemd or init.d service
|
#let user choose to install systemd or init.d service
|
||||||
unset INST_SYSTEMD
|
|
||||||
unset INST_INITD
|
|
||||||
while true; do
|
while true; do
|
||||||
echo
|
echo
|
||||||
top_border
|
top_border
|
||||||
@@ -31,10 +29,12 @@ get_user_selections_klipper(){
|
|||||||
read -p "${cyan}###### Please choose:${default} " action
|
read -p "${cyan}###### Please choose:${default} " action
|
||||||
case "$action" in
|
case "$action" in
|
||||||
1|"")
|
1|"")
|
||||||
|
echo -e "###### > 1) Init.d"
|
||||||
INST_KLIPPER_INITD="true"
|
INST_KLIPPER_INITD="true"
|
||||||
INST_KLIPPER_SYSTEMD="false"
|
INST_KLIPPER_SYSTEMD="false"
|
||||||
break;;
|
break;;
|
||||||
2)
|
2)
|
||||||
|
echo -e "###### > 2) Systemd"
|
||||||
INST_KLIPPER_INITD="false"
|
INST_KLIPPER_INITD="false"
|
||||||
INST_KLIPPER_SYSTEMD="true"
|
INST_KLIPPER_SYSTEMD="true"
|
||||||
break;;
|
break;;
|
||||||
|
|||||||
@@ -39,20 +39,6 @@ read_listen_port(){
|
|||||||
LISTEN_PORT=$(grep listen /etc/nginx/sites-enabled/$1 | head -1 | sed 's/^\s*//' | cut -d" " -f2 | cut -d";" -f1)
|
LISTEN_PORT=$(grep listen /etc/nginx/sites-enabled/$1 | head -1 | sed 's/^\s*//' | cut -d" " -f2 | cut -d";" -f1)
|
||||||
}
|
}
|
||||||
|
|
||||||
#test_nginx(){
|
|
||||||
# HOST_IP=$(hostname -I | cut -d" " -f1)
|
|
||||||
# status_msg "Testing NGINX ..."
|
|
||||||
# status_msg "Please wait ..."
|
|
||||||
# sleep 15
|
|
||||||
# status_msg "API response from http://$HOST_IP:$1/printer/info :"
|
|
||||||
# echo -e "${cyan}$(curl -s "http://"$HOST_IP:$1"/printer/info")${default}"
|
|
||||||
# if [ $(curl -s "http://"$HOST_IP:$1"/printer/info" | grep '^{"result"' -c) -eq 1 ]; then
|
|
||||||
# echo; ok_msg "NGINX is working correctly!"; echo
|
|
||||||
# else
|
|
||||||
# echo; warn_msg "NGINX is not working correctly!"; echo
|
|
||||||
# fi
|
|
||||||
#}
|
|
||||||
|
|
||||||
detect_enabled_sites(){
|
detect_enabled_sites(){
|
||||||
#check if there is another UI config already installed
|
#check if there is another UI config already installed
|
||||||
#and reads the port they are listening on
|
#and reads the port they are listening on
|
||||||
|
|||||||
Reference in New Issue
Block a user