modified moonraker update management section and install
This commit is contained in:
16
install.sh
16
install.sh
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
USER_CONFIG_PATH="${HOME}/printer_data/config"
|
||||
MOONRAKER_CONFIG="${HOME}/printer_data/config/moonraker.conf"
|
||||
KLIPPER_PATH="${HOME}/klipper"
|
||||
|
||||
K_SHAKETUNE_PATH="${HOME}/klippain_shaketune"
|
||||
@@ -110,11 +111,24 @@ function link_gcodeshellcommandpy {
|
||||
fi
|
||||
}
|
||||
|
||||
function add_updater {
|
||||
update_section=$(grep -c '\[update_manager[a-z ]* Klippain-ShakeTune\]' $MOONRAKER_CONFIG || true)
|
||||
if [ "$update_section" -eq 0 ]; then
|
||||
echo -n "[INSTALL] Adding update manager to moonraker.conf..."
|
||||
cat ${K_SHAKETUNE_PATH}/moonraker.conf >> $MOONRAKER_CONFIG
|
||||
fi
|
||||
}
|
||||
|
||||
function restart_klipper {
|
||||
echo "[POST-INSTALL] Restarting Klipper..."
|
||||
sudo systemctl restart klipper
|
||||
}
|
||||
|
||||
function restart_moonraker {
|
||||
echo "[POST-INSTALL] Restarting Moonraker..."
|
||||
sudo systemctl restart moonraker
|
||||
}
|
||||
|
||||
|
||||
printf "\n=============================================\n"
|
||||
echo "- Klippain Shake&Tune module install script -"
|
||||
@@ -126,5 +140,7 @@ preflight_checks
|
||||
check_download
|
||||
setup_venv
|
||||
link_extension
|
||||
add_updater
|
||||
link_gcodeshellcommandpy
|
||||
restart_klipper
|
||||
restart_moonraker
|
||||
|
||||
Reference in New Issue
Block a user