initial commit of file from CVS for e-smith-email on Wed 12 Jul 08:53:55 BST 2023
This commit is contained in:
13
root/etc/e-smith/events/actions/fetchmail-migrate-fetchids
Normal file
13
root/etc/e-smith/events/actions/fetchmail-migrate-fetchids
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
my $original_file = "/run/lock/fetchmail/.fetchids";
|
||||
my $new_file = "/var/lib/fetchmail/.fetchids";
|
||||
|
||||
exit 0 if ( -f $new_file ) ;
|
||||
exit 0 unless ( -f $original_file ) ;
|
||||
while ( -f "/run/lock/fetchmail/fetchmail.pid" ) {
|
||||
print "waiting for fetchmail to finish";
|
||||
sleep 10;
|
||||
}
|
||||
|
||||
system("/usr/bin/mv $original_file $new_file") == 0 or warn "The move $original_file to $new_file operation failed: $!";
|
Reference in New Issue
Block a user