2 package IkiWiki::Plugin::rsync;
5 no warnings 'redefine';
10 hook(type => "getsetup", id => "rsync", call => \&getsetup);
11 hook(type => "checkconfig", id => "rsync", call => \&checkconfig);
12 hook(type => "postrefresh", id => "rsync", call => \&postrefresh);
23 example => "rsync -qa --delete /path/to/destdir/ user\@host:/path/to/docroot/",
24 description => "command to upload regenerated pages to another host",
31 if (! exists $config{rsync_command} ||
32 ! defined $config{rsync_command}) {
33 error("Must specify rsync_command");
38 debug "in postrefresh hook, gonna run rsync";
39 system $config{rsync_command};
41 error("failed to execute rsync_command: $!");
43 error(sprintf("rsync_command exited %d", $? >> 8));