ebx

 view release on metacpan or  search on metacpan

ebx  view on Meta::CPAN

#!/usr/bin/perl
# $File: //depot/ebx/ebx $ $Author: clkao $
# $Revision: #112 $ $Change: 2072 $ $DateTime: 2001/10/15 09:43:21 $

$VERSION  = '0.87';
$REVISION = 'rev'.substr('$Revision: #112 $', 12, -2).
	    '['.substr('$Change: 2072 $', 9, -2).']';

=head1 NAME

ebx - Elixir BBS Exchange Suite

=head1 SYNOPSIS

B<ebx> B<sync> S<[ B<-adfghlmopuxAFPRS> ]> S<[ B<-m> I<maxmsg> ]>
    S<[ B<-o> [I<logfile>] ]> S<[ B<-r> I<seconds> ]> S<[ B<-s> [I<interval>] ]>
    S<[ B<-u> I<user> ]> S<[ I<boards>... ]>

B<ebx> <B<set>|B<del>|B<list>>B<pass> S<[ B<-u> I<user> ]> S<[ I<sites>... ]>

B<ebx> <B<set>|B<list>>B<board> S<[ I<boards>... ]>

=head1 DESCRIPTION

This script synchronizes your local BBS's storage via the BBSCOM
settings configured within.

=head1 COMMANDS

    sync		perform synchronization

    setpass		add login/password pairs
    delpass		delete login/password pairs
    listpass		list current passring

    setboard		set up boards for mirroring
    listboard		list board settings

=head1 OPTIONS

    -a			recursively sync archive
    -d			enable debugging messages
    -f			enable per-site forking (Unix only)
    -g			skip passring check, use guest for all sites
    -h			show help message and usage info
    -l			enable per-site locking
    -m <maxmsg>		set maximal number of message to keep track
    -o [logfile]	output to log stdout instead of log files
    -p			post only; skip fetching articles
    -r <delay>		repeat sync every <delay> seconds
    -s [interval]	write config every [interval] updates (default 1)
    -u <user>		specify the owner of gpg passring
    -x			remove lockfiles and proceed anyway
    -A			sync archive *only*: ignore articles
    -F			force fetching of duplicate articles
    -P			preserve remote user id and headers
    -R			refresh message id, do nothing else
    <boards>...		process specified boards or source
    <sites>...		set passring against specified site identifiers

=head1 ENVIRONMENT

The following environment variables are understood by ebx:

=over

=item EBX_BACKEND

The local BBS's backend. Defaults to C<MELIX>.

=item EBX_BBSROOT

The local BBS's location. Defaults to F</home/melix> or F</home/bbs>.

=item EBX_USER

The owner to F<.ebx.keyring>, the private passring used to store
encrypted ebx passwords. Defaults to C<USER>.

=item EBX_HOME

The home directory of B<EBX_USER>, defaults to C<HOME>.

=back

=cut

use strict;
use warnings;

use constant IsWin32 => ($^O eq 'MSWin32');
use constant MAX_BOARD_LENGTH => 12;
use open (IsWin32 ? (IN => ':raw', OUT => ':raw') : ());
use Term::ReadKey;

BEGIN { ReadMode('noecho') }
END   { ReadMode('restore') }

use File::Spec;
use IO::Handle;
use MIME::Base64;
use Compress::Zlib;
use Getopt::Std;
use Storable qw/nfreeze thaw/;

use OurNet::BBS '1.6';
use OurNet::BBSApp::Sync;

$|++;

END {
    if ($^O eq 'MSWin32' and substr($0, -4) eq '.exe' and eval 'use Win32; 1') {



( run in 0.684 second using v1.01-cache-2.11-cpan-df04353d9ac )