Skip to content

Commit

Permalink
Update install-led_effect.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeanon committed May 2, 2024
1 parent 7842033 commit 1355e09
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions install-led_effect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,6 @@ restart_moonraker()
echo "[OK]"
}

# Add updater for led_effect to moonraker.conf
add_updater()
{
read -p " Do you want to install updater? (y/n): " answer
if [ "$answer" != "${answer#[Yy]}" ]; then
echo -e -n "Adding update manager to moonraker.conf... "

update_section=$(grep -c '\[update_manager led_effect\]' ${MOONRAKER_CONFIG_DIR}/moonraker.conf || true)
if [ "${update_section}" -eq 0 ]; then
echo -e "\n" >> ${MOONRAKER_CONFIG_DIR}/moonraker.conf
while read -r line; do
echo -e "${line}" >> ${MOONRAKER_CONFIG_DIR}/moonraker.conf
done < "$PWD/file_templates/moonraker_update.txt"
echo -e "\n" >> ${MOONRAKER_CONFIG_DIR}/moonraker.conf
echo "[OK]"
restart_moonraker
else
echo -e "[update_manager led_effect] already exists in moonraker.conf [SKIPPED]"
fi
fi
}

restart_klipper()
{
echo -n "Restarting Klipper... "
Expand Down Expand Up @@ -140,7 +118,6 @@ check_folders
stop_klipper
if [ ! $UNINSTALL ]; then
link_extension
add_updater
else
uninstall
fi
Expand Down

0 comments on commit 1355e09

Please sign in to comment.