Improved installer_ms050.sh
* To avoid double entrys in moonraker.conf, check for 'update_manager' entry Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
parent
f8cf92f6a3
commit
2bad5009bf
@ -102,14 +102,17 @@ sudo systemctl start webcamd
|
|||||||
|
|
||||||
# webcamd to moonraker.conf
|
# webcamd to moonraker.conf
|
||||||
echo -e "Adding update manager to moonraker.conf"
|
echo -e "Adding update manager to moonraker.conf"
|
||||||
cat >> ${HOME}/klipper_config/moonraker.conf << EOF
|
|
||||||
|
|
||||||
[update_manager webcamd]
|
update_section=$(grep -c '\[update_manager webcamd\]' \
|
||||||
type: git_repo
|
${HOME}/klipper_config/moonraker.conf)
|
||||||
path: ~/crowsnest
|
if [ "${update_section}" -eq 0 ]; then
|
||||||
origin: https://github.com/mainsail-crew/crowsnest.git
|
echo -e "\n" >> ${HOME}/klipper_config/moonraker.conf
|
||||||
|
while read -r line; do
|
||||||
EOF
|
echo -e "${line}" >> ${HOME}/klipper_config/moonraker.conf
|
||||||
|
done < "$PWD/file_templates/moonraker_update.txt"
|
||||||
|
echo -e "\n" >> ${HOME}/klipper_config/moonraker.conf
|
||||||
|
else
|
||||||
|
echo -e "[update_manager webcamd] already exist in moonraker.conf [SKIPPED]"
|
||||||
|
|
||||||
echo -e "Finished Installation..."
|
echo -e "Finished Installation..."
|
||||||
echo -e "Please reboot the PI."
|
echo -e "Please reboot the PI."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user