From 80344ec41c33582b7ee44725c30b6158cbe5e461 Mon Sep 17 00:00:00 2001 From: th33xitus <> Date: Thu, 23 Jul 2020 11:04:23 +0200 Subject: [PATCH] Fixes --- scripts/functions.sh | 9 --------- scripts/install_dwc2.sh | 7 ++++--- scripts/install_mainsail.sh | 6 ++++-- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index 3c716d1..626f538 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -128,15 +128,6 @@ print_error(){ fi } -#pkg_check(){ -# #WIP -# if [[ $(dpkg-query -f'${Status}' --show $PKG 2>/dev/null) = *\ installed ]]; then -# echo "WIP" -# else -# sudo apt-get -y install $PKG 2>/dev/null -# fi -#} - build_fw(){ if [ -d $KLIPPER_DIR ]; then cd $KLIPPER_DIR && make menuconfig diff --git a/scripts/install_dwc2.sh b/scripts/install_dwc2.sh index 2472fc7..30d7f06 100644 --- a/scripts/install_dwc2.sh +++ b/scripts/install_dwc2.sh @@ -155,9 +155,10 @@ dwc2_reverse_proxy_dialog(){ } dwc2_reverse_proxy(){ - if ! [[ $(dpkg-query -f'${Status}' --show nginx 2>/dev/null) = *\ installed ]]; then - sudo apt-get install nginx -y - fi + #check for dependencies + dep=(avahi-daemon nginx) + dependency_check + #execute operations cat ${HOME}/kiauh/resources/dwc2_nginx.cfg > ${HOME}/kiauh/resources/dwc2 sudo mv ${HOME}/kiauh/resources/dwc2 /etc/nginx/sites-available/dwc2 if [ -e /etc/nginx/sites-enabled/default ]; then diff --git a/scripts/install_mainsail.sh b/scripts/install_mainsail.sh index 30f212a..d114d58 100644 --- a/scripts/install_mainsail.sh +++ b/scripts/install_mainsail.sh @@ -3,10 +3,12 @@ mainsail_install_routine(){ if [ -d $KLIPPER_DIR ]; then #check for dependencies dep=(wget curl unzip) - dep_check + dependency_check #execute operation #disable octoprint service if installed - disable_octoprint_service + if systemctl is-enabled octoprint.service -q 2>/dev/null; then + disable_octoprint_service + fi disable_haproxy_lighttpd remove_haproxy_lighttpd install_moonraker