Newer nextcloudcmd only allows passing base url as server. Subfolders
have to be passed via a --path argument.
- $0 [OPTIONS] source_dir server_url
+ $0 [OPTIONS] source_dir server_url [ARGS...]
-s Silent, be less verbose
-t SECS Sync period if nothing changed locally.
Default: 180
-s Silent, be less verbose
-t SECS Sync period if nothing changed locally.
Default: 180
+ ARGS Passed to nextcloudcmd
- $0 ~/.vimwiki https://cloud.example.com/remote.php/webdav/vimwiki
+ $0 ~/.vimwiki https://cloud.example.com --path vimwiki
while getopts "host:" OPTION; do
case "${OPTION}" in
while getopts "host:" OPTION; do
case "${OPTION}" in
SOURCE_DIR=$1
SERVER_URL=$2
SOURCE_DIR=$1
SERVER_URL=$2
if [ -z "${SOURCE_DIR}" ] ; then
echo "No source directory given."
if [ -z "${SOURCE_DIR}" ] ; then
echo "No source directory given."
-NCC_OPTS="${NCC_OPTS} ${SOURCE_DIR} ${SERVER_URL}"
+NCC_OPTS="${NCC_OPTS} $@ ${SOURCE_DIR} ${SERVER_URL}"
while true; do
echo "About to sync..."
while true; do
echo "About to sync..."
After=network-online.target
[Service]
After=network-online.target
[Service]
-ExecStart=%h/.local/bin/nextcloud-inotify-sync %h/.vimwiki "https://cloud.example.org/remote.php/webdav/vimwiki"
+ExecStart=%h/.local/bin/nextcloud-inotify-sync %h/.vimwiki "https://cloud.example.com" --path vimwiki
Restart=always
RestartSec=10min
Restart=always
RestartSec=10min