Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

owncloud client #3

Open
jegesm opened this issue Nov 16, 2016 · 0 comments
Open

owncloud client #3

jegesm opened this issue Nov 16, 2016 · 0 comments

Comments

@jegesm
Copy link
Contributor

jegesm commented Nov 16, 2016

How to sort two-way sync between owncloud server and any instance of containers?
At the moment I mount the "files" directory of each user, which is clearly is a one-way sync. Anything copied/uploaded to this directory should go through either the server or the client, so that it is journaled in the database.

How about an inotify script to a folder in the container?
This will watch a certain folder for any changes, does the sync, waits for 3s, then keeps watching

USER=tmp_oneuser
DIR=/home/$USER
TARGET=http://compare.vo.elte.hu/owncloud/remote.php/webdav/

inotifywait -m $DIR  -e create -e moved_to --exclude ".csync_journal.db"|
while read path action file; do
        echo "The file '$file' appeared in directory '$path' via '$action'"
       # do something with the file
       owncloudcmd --user $USER --password userpass $DIR $TARGET
       sleep 3
done

Is there any drawback using a script like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant