Scan outputs duration (raw output too ugly for toast)

This commit is contained in:
James Barnsley
2020-02-14 10:35:29 +13:00
parent 0c7db5f994
commit d20fbdf69f

View File

@ -26,12 +26,13 @@ elif [[ $1 = "restart" ]]; then
fi fi
elif [[ $1 = "local_scan" ]]; then elif [[ $1 = "local_scan" ]]; then
START=$(date +%s)
if $IS_CONTAINER; then if $IS_CONTAINER; then
SCAN="$(mopidy --config /config/mopidy.conf local scan 2>&1)" SCAN=$(mopidy --config /config/mopidy.conf local scan)
else else
SCAN="$(sudo mopidyctl local scan 2>&1)" SCAN=$(sudo mopidyctl local scan)
fi fi
echo -e "${SCAN}" echo -e "Completed in $(($(date +%s) - $START)) seconds"
elif [[ $1 = "check" ]]; then elif [[ $1 = "check" ]]; then
echo -e "Access permitted" echo -e "Access permitted"