mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 03:24:29 +05:00
fix: tweak moonraker/mainsail install process
This commit is contained in:
@@ -9,12 +9,13 @@ install_mainsail(){
|
||||
}
|
||||
|
||||
test_nginx(){
|
||||
HOST_IP=$(hostname -I | cut -d" " -f1)
|
||||
status_msg "Testing Nginx ..."
|
||||
sleep 5
|
||||
status_msg "API response from http://localhost/printer/info :"
|
||||
API_RESPONSE="$(curl -sG4m5 http://localhost/printer/info)"
|
||||
status_msg "API response from http://$HOST_IP/printer/info :"
|
||||
API_RESPONSE="$(curl -sG4m5 http://$HOST_IP/printer/info)"
|
||||
echo -e "${cyan}$API_RESPONSE${default}"
|
||||
if [ $(curl -sG4 "http://localhost/printer/info" | grep '^{"result"' -c) -eq 1 ]; then
|
||||
if [ $(curl -sG4 "http://$HOST_IP/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
|
||||
|
||||
Reference in New Issue
Block a user