We have a Linux based web server (Media Temple) where we host several domains via their DV hosting solution. I have successfully created the SVN repository for one of our projects but now I would like it to sync the live web folder on committ. Both the repo and the site files are on the same server... Paths are as follows:
The SVN Repo is here: /home/svn/repositories/<site name>
The Live Site files are here: /var/www/vhosts/<domain>/httpdocs/<subdomain>
I can connect to the repo without problem. The live site works as well. Now I just need to get them to sync.
I have created the following update file as per guide and correctly updated the POST-COMMIT.tmpl but still no dice. http://www.frenssen.be/content/using-subversion-automatically-update-live-website
Here is the code in my update program:
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
int main(void)
{
execl("/usr/bin/svn", "svn", "update",
"/var/www/vhosts/<domain>/httpdocs/<subdomain>",
(const char *) NULL);
return(EXIT_FAILURE);
}
And I called the program in the POST-COMMIT.tmpl file with the following:
#!/bin/sh
/home/svn/repositories/autoupdate/autoupdate
Any ideas what I am missing? There has to be an easier way to get the files to sync?