Next: , Previous: , Up: Configuration   [Contents][Index]


2.3 Notification

vcsync can be configured to send a notification over INET or UNIX sockets, after completing user request.

The notification protocol is based on TCPMUX (RFC 1078).

After establishing connection to the notification socket declared in the configuration, vcsync sends the predefined tag followed by a CRLF pair. The remote party replies with a single character indicating positive (‘+’) or negative (‘-’) acknowledgment, optionally followed by a message of explanation, and terminated with a CRLF.

If positive acknowledgment is received, vcsync sends in reply the destination directory name followed by CRLF. After this line, it sends names of all subdirectories changed by this synchronization. Each directory name is sent on a separate line terminated with CRLF. After this, vcsync closes connection.

Notification is configured using the following two post-sync statements:

Config: post-sync-socket url

Send notification to url about successful synchronization.

Allowed formats for url are:

inet://hostname[:port]

Connect to remote host hostname using TCP/IP. Hostname is the host name or IP address of the remote machine. Optional port specifies the port number to connect to. It can be either a decimal port number or a service name from /etc/services. If port is absent, ‘tcpmux’ (port 1) is assumed.

unix://filename
local://filename

Connect to a UNIX socket filename.

Config: post-sync-tag tag

Define the TCPMUX service name to use. The default is ‘vcsync’.