optimize backrest

This commit is contained in:
CanbiZ
2025-05-27 16:14:34 +02:00
parent 8f69e39e02
commit 849c43f85a
3 changed files with 25 additions and 12 deletions

View File

@@ -32,6 +32,15 @@ install_node_and_modules() {
NEED_NODE_INSTALL=true
fi
if ! command -v jq &>/dev/null; then
$STD msg_info "Installing jq..."
$STD apt-get update -qq &>/dev/null
$STD apt-get install -y jq &>/dev/null || {
msg_error "Failed to install jq"
return 1
}
fi
# Install Node.js if required
if [[ "$NEED_NODE_INSTALL" == true ]]; then
$STD apt-get purge -y nodejs