nextcloud: Add nc-inotify-sync
[shutils.git] / nextcloud / nextcloud-sync
diff --git a/nextcloud/nextcloud-sync b/nextcloud/nextcloud-sync
new file mode 100644 (file)
index 0000000..84eacea
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# This script can be fired in crontab; it will launch a tmux sync session when none exists.
+
+ncc=~/.local/bin/nc-inotify-sync
+tmux has-session -t nc-vimwiki || tmux new-session -d -s nc-vimwiki "${ncc} ~/.vimwiki https://cloud.example.com/remote.php/webdav/vimwiki"