refactor(install): improve install if unattended

Output should be mor verbose if unattended to help debugging

Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
Stephan Wendel 2022-05-05 20:10:20 +02:00
parent 36893bf9d4
commit dcb55816d3
No known key found for this signature in database
GPG Key ID: F465B83ACBA45639
2 changed files with 8 additions and 5 deletions

View File

@ -33,16 +33,16 @@ help:
@echo "" @echo ""
install: install:
@bash -c tools/install.sh @bash -c 'tools/install.sh'
unattended: unattended:
@bash -c tools/install.sh -z @bash -c 'tools/install.sh -z'
uninstall: uninstall:
@bash -c tools/uninstall.sh @bash -c 'tools/uninstall.sh'
update: update:
@bash -c tools/update.sh @bash -c 'tools/update.sh'
build: build:
@git submodule update @git submodule update

View File

@ -211,7 +211,8 @@ function install_crowsnest {
fi fi
if [ "${UNATTENDED}" == "true" ]; then if [ "${UNATTENDED}" == "true" ]; then
echo -en "Adding Crowsnest Update Manager entry to moonraker.conf ...\r" echo -en "Adding Crowsnest Update Manager entry to moonraker.conf ...\r"
cat "${moonraker_update}" >> "${moonraker_conf}" cat "${moonraker_conf}" "${moonraker_update}" | \
tee "${moonraker_conf}" > /dev/null
echo -e "Adding Crowsnest Update Manager entry to moonraker.conf ... [OK]" echo -e "Adding Crowsnest Update Manager entry to moonraker.conf ... [OK]"
fi fi
echo -en "Add User ${BASE_USER} to group 'video' ...\r" echo -en "Add User ${BASE_USER} to group 'video' ...\r"
@ -261,6 +262,8 @@ function install_raspicam_fix {
while getopts "z" arg; do while getopts "z" arg; do
case ${arg} in case ${arg} in
z) z)
echo "Running in UNATTENDED Mode ..."
set -x
UNATTENDED="true" UNATTENDED="true"
;; ;;
*) *)