2011/8/18 Sergio AFANOU <
afanou...@gmail.com>:
> Hi Guys !
> Well, I thought about a database (just a file where I can write some
> structured info) for many reasons.
> First, I thought about writing infos into a simple text file, then I
> realized that there may be some issues retrieving and parsing correctly the
> stored data. The info I need to store is about the event (create, delete,
> modify, attribute), the source, the target, the remote server, and some
> other info like that. I'm affraid it will be more complex to correctly parse
> the data in a plaintext file than to retrieve them from a sqllite.db file.
> Second, It is more simple to modify parameters with a GUI if you just read
> them from a database and store the new value. I don't know how applications
> in Linux read an write configuration data. We can dig that way (but lipsync
> can become less portable on other platforms like Mac Os).
>
> Third, I choosed sqllite because It is portable and lightweight. The file
> inside can be read with any sqlite client. I'm currently looking for a linux
> sqlite client.
> I also thought about doing a simple if statement as tdrusk suggested. I
> couldn't develop further because when lsyncd issues a file synchronization
> (spawn the event), we don't have access to the process (or the code) to make
> our connexion test. So I have been obliged to develop level 3 scripts to
> implement the offline stuff. At that level, I can control what to do if a
> file needs to be synced.
> Feel free to comment :)
> Cheers !
The SQLite client is simple, just use sqlite package, and then you can
run the db via command line (or from a shell script).
But in fact I didn't know well the lipsync, but when i read the source
it seems to using rsync, not? The rsync can reach itself up from any
time.
--
"Overhead, without any fuss, the stars were going out."