mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 03:24:29 +05:00
fix: remove update manager question. thanks to the recent changes to the update manager, mainsail and fluidd can be supported at the same time.
This commit is contained in:
@@ -57,9 +57,6 @@ install_mainsail(){
|
|||||||
### ask user to install the recommended webinterface macros
|
### ask user to install the recommended webinterface macros
|
||||||
get_user_selection_kiauh_macros
|
get_user_selection_kiauh_macros
|
||||||
|
|
||||||
### ask user to enable the moonraker update manager
|
|
||||||
enable_update_manager "mainsail"
|
|
||||||
|
|
||||||
### creating the mainsail nginx cfg
|
### creating the mainsail nginx cfg
|
||||||
set_nginx_cfg "mainsail"
|
set_nginx_cfg "mainsail"
|
||||||
|
|
||||||
@@ -86,9 +83,6 @@ install_fluidd(){
|
|||||||
### ask user to install the recommended webinterface macros
|
### ask user to install the recommended webinterface macros
|
||||||
get_user_selection_kiauh_macros
|
get_user_selection_kiauh_macros
|
||||||
|
|
||||||
### ask user to enable the moonraker update manager
|
|
||||||
enable_update_manager "fluidd"
|
|
||||||
|
|
||||||
### creating the fluidd nginx cfg
|
### creating the fluidd nginx cfg
|
||||||
set_nginx_cfg "fluidd"
|
set_nginx_cfg "fluidd"
|
||||||
|
|
||||||
@@ -288,59 +282,3 @@ fluidd_setup(){
|
|||||||
rm -rf *.zip && ok_msg "Done!" && ok_msg "Fluidd installation complete!"
|
rm -rf *.zip && ok_msg "Done!" && ok_msg "Fluidd installation complete!"
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_update_manager(){
|
|
||||||
source_kiauh_ini
|
|
||||||
### ask user if he wants to enable the moonraker update manager
|
|
||||||
while true; do
|
|
||||||
echo
|
|
||||||
top_border
|
|
||||||
echo -e "| Do you want to enable the Moonraker Update Manager | "
|
|
||||||
echo -e "| for the selected webinterface? | "
|
|
||||||
hr
|
|
||||||
echo -e "| ${yellow}Please note:${default} | "
|
|
||||||
echo -e "| Entries for an already enabled update manager will be | "
|
|
||||||
echo -e "| overwritten if you decide to choose 'Yes'! | "
|
|
||||||
bottom_border
|
|
||||||
echo
|
|
||||||
read -p "${cyan}###### Enable Update Manager? (Y/n):${default} " yn
|
|
||||||
case "$yn" in
|
|
||||||
Y|y|Yes|yes|"")
|
|
||||||
echo -e "###### > Yes"
|
|
||||||
if [ $1 = "mainsail" ]; then
|
|
||||||
MOONRAKER_UPDATE_MANAGER="[update_manager]\nclient_repo: meteyou/mainsail\nclient_path: /home/${USER}/mainsail"
|
|
||||||
elif [ $1 = "fluidd" ]; then
|
|
||||||
MOONRAKER_UPDATE_MANAGER="[update_manager]\nclient_repo: cadriel/fluidd\nclient_path: /home/${USER}/fluidd"
|
|
||||||
else
|
|
||||||
unset MOONRAKER_UPDATE_MANAGER
|
|
||||||
fi
|
|
||||||
### handle single moonraker install
|
|
||||||
if [ -f /etc/systemd/system/moonraker.service ]; then
|
|
||||||
### delete existing entries
|
|
||||||
sed -i "/update_manager/d" $klipper_cfg_loc/moonraker.conf
|
|
||||||
sed -i "/client_repo/d" $klipper_cfg_loc/moonraker.conf
|
|
||||||
sed -i "/client_path/d" $klipper_cfg_loc/moonraker.conf
|
|
||||||
echo -e $MOONRAKER_UPDATE_MANAGER >> $klipper_cfg_loc/moonraker.conf
|
|
||||||
fi
|
|
||||||
### handle multi moonraker installs
|
|
||||||
if ls /etc/systemd/system/moonraker-*.service 2>/dev/null 1>&2; then
|
|
||||||
for moonraker_conf in $(find $klipper_cfg_loc/printer_*/moonraker.conf); do
|
|
||||||
### delete existing entries
|
|
||||||
sed -i "/update_manager/d" $moonraker_conf
|
|
||||||
sed -i "/client_repo/d" $moonraker_conf
|
|
||||||
sed -i "/client_path/d" $moonraker_conf
|
|
||||||
echo -e $MOONRAKER_UPDATE_MANAGER >> $moonraker_conf
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
moonraker_service "restart"
|
|
||||||
break;;
|
|
||||||
N|n|No|no)
|
|
||||||
echo -e "###### > No"
|
|
||||||
unset MOONRAKER_UPDATE_MANAGER
|
|
||||||
break;;
|
|
||||||
*)
|
|
||||||
print_unkown_cmd
|
|
||||||
print_msg && clear_msg;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user