add: karakeep cli wrapper (#14618)

* add: karakeep cli wrapper

* Create /usr/bin/karakeep if it doesn't exist

* add: ejs for yt-dlp

* add: ejs for yt-dlp

* Fix pip install command for yt-dlp-ejs

* Fix pip install command to use STD variable

* rm python3 dep

* rm python3 dep

* ensure_dependencies

* add: deno

* add: deno

* rm: not needed msg block
This commit is contained in:
Tobias
2026-05-22 19:20:18 +02:00
committed by GitHub
parent 274505536f
commit 202f1c7e84
2 changed files with 30 additions and 0 deletions
+19
View File
@@ -53,6 +53,25 @@ function update_script() {
if grep -q '^ExecStart=/usr/bin/node\s\+dist/index\.mjs$' /etc/systemd/system/karakeep-workers.service; then
sed -i -E 's#^(ExecStart=/usr/bin/node\s+dist/)index\.mjs$#\1index.js#' /etc/systemd/system/karakeep-workers.service
systemctl daemon-reload
fi
if [ ! -f /usr/bin/karakeep ]; then
cat <<'EOF' >/usr/bin/karakeep
#!/usr/bin/env node
import('/opt/karakeep/apps/cli/dist/index.mjs')
EOF
chmod +x /usr/bin/karakeep
fi
if ! command -v pip >/dev/null 2>&1 || ! pip show yt-dlp-ejs >/dev/null 2>&1; then
msg_info "Installing external JavaScript Extension for yt-dlp"
ensure_dependencies python3-pip
$STD pip install -U yt-dlp-ejs
msg_ok "Installed external JavaScript Extension for yt-dlp"
fi
if ! command -v deno &>/dev/null; then
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "latest" "/usr/local/bin" "deno-$(uname -m)-unknown-linux-gnu.zip"
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep" "tarball"