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:
@@ -22,6 +22,8 @@ if [ "${OBSIDIAN_CONTINUOUS_SYNC}" = "true" ]; then
|
|||||||
--path "${VAULT_PATH}" \
|
--path "${VAULT_PATH}" \
|
||||||
--password "${OBSIDIAN_E2E_PASSWORD}" \
|
--password "${OBSIDIAN_E2E_PASSWORD}" \
|
||||||
--device-name "${OBSIDIAN_DEVICE_NAME:-simbarag}"; then
|
--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
|
# Start continuous sync in background
|
||||||
echo "Starting Obsidian continuous sync..."
|
echo "Starting Obsidian continuous sync..."
|
||||||
ob sync --continuous --path "${VAULT_PATH}" &
|
ob sync --continuous --path "${VAULT_PATH}" &
|
||||||
|
|||||||
Reference in New Issue
Block a user