initial commit of file from CVS for smeserver-rsync on Thu Oct 9 11:55:12 AEDT 2025

This commit is contained in:
Trevor Batley
2025-10-09 11:55:12 +11:00
parent 00a991dd95
commit 796907bcb8
39 changed files with 4258 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# Author Stephen Noble <stephen@dungog.net>
# create run rsync scripts for dungog-rsync
#----------------------------------------------------------------------
package esmith;
#use strict;
#use Errno;
use esmith::config;
use esmith::util;
use esmith::db;
my %conf;
tie %conf, 'esmith::config';
#local %dungog;
#tie %dungog, 'esmith::config', '/home/e-smith/db/dungog';
my $event = $ARGV [0];
my $rsync = $ARGV [1];
my $user = $ARGV [2];
die "rsync argument missing." unless defined ($rsync);
die "user argument missing." unless defined ($user);
system("/bin/su -c /usr/bin/dungogrsync-$rsync $user 2> /var/log/dungogrsyncnow 1> /var/log/dungogrsyncnow") == 0
or die ("Error occurred while running rsync.\n");
exit (0)