Remove stale Obsidian sync lock before starting continuous sync

The ob CLI uses a directory lock at .obsidian/.sync.lock that persists
across container restarts via the volume mount, causing "Another sync
instance is already running" errors. Remove it before starting sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 00:07:37 -04:00
parent 75e6b09464
commit ad5b889bf1
+2
View File
@@ -22,6 +22,8 @@ if [ "${OBSIDIAN_CONTINUOUS_SYNC}" = "true" ]; then
--path "${VAULT_PATH}" \
--password "${OBSIDIAN_E2E_PASSWORD}" \
--device-name "${OBSIDIAN_DEVICE_NAME:-simbarag}"; then
# Remove stale lock from previous container run
rm -rf "${VAULT_PATH}/.obsidian/.sync.lock"
# Start continuous sync in background
echo "Starting Obsidian continuous sync..."
ob sync --continuous --path "${VAULT_PATH}" &