Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix: migrate systemd config to the new worker path on update. fixes #1889

Mohamed Basseme5dea9568b9b
diff --git a/karakeep-linux.sh b/karakeep-linux.sh
index ef2ff03a..25822b59 100644
--- a/karakeep-linux.sh
+++ b/karakeep-linux.sh
@@ -448,6 +448,15 @@ update_karakeep() {
msg_done "Updated $(app) ${CYAN}to v${RELEASE}${CLR}"
msg_start "Restarting services and cleaning up..."
rm /tmp/v"$RELEASE".zip
+
+ # Migrations
+ # 0.27 changed the worker compiled file from .mjs to .js
+ 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
+ # End migrations
+
systemctl restart karakeep.target
service_check update
else