]> git.p6c8.net - selfforum.git/blob - selfforum-cgi/user/fo_sev.pl
added fo_sev.pl - seperate severancer script
[selfforum.git] / selfforum-cgi / user / fo_sev.pl
1 #!/usr/bin/perl -w
2
3 ################################################################################
4 # #
5 # File: user/fo_sev.pl #
6 # #
7 # Authors: André Malo <nd@o3media.de>, 2001-04-08 #
8 # #
9 # Description: severancer script #
10 # #
11 ################################################################################
12
13 use strict;
14 use vars qw(
15 $Bin
16 $Shared
17 $Script
18 $Config
19 $VERSION
20 );
21
22 # locate the script
23 #
24 BEGIN {
25 my $null = $0; $null =~ s/\\/\//g; # for win :-(
26 $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.';
27 $Shared = "$Bin/../shared";
28 $Config = "$Bin/config";
29 $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null;
30
31 # my $null = $0;
32 # $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.';
33 # $Config = "$Bin/../../daten/forum/config";
34 # $Shared = "$Bin/../../cgi-shared";
35 # $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null;
36 }
37
38 # setting umask, remove or comment it, if you don't need
39 #
40 umask 006;
41
42 ################################################################################
43 #
44 # Version check
45 #
46 $VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
47
48 use lib "$Shared";
49 use CGI::Carp qw(fatalsToBrowser);
50
51 use Arc::Archive;
52 use Conf;
53 use Conf::Admin;
54 use Posting::Cache;
55
56 # load script configuration and admin default conf.
57 #
58 my $conf = read_script_conf ($Config, $Shared, $Script);
59 my $adminDefault = read_admin_conf ($conf -> {files} -> {adminDefault});
60
61 my $stat = cut_tail ({
62 forumFile => $conf->{files}->{forum},
63 messagePath => $conf->{files}->{messagePath},
64 archivePath => $conf->{files}->{archivePath},
65 lockFile => $conf->{files}->{sev_lock},
66 adminDefault => $adminDefault,
67 cachePath => $conf->{files}->{cachePath}
68 });
69 # die $stat->{(keys %$stat)[0]} if (%$stat);
70
71 #
72 #
73 ### end of fo_sev.pl ###########################################################

patrick-canterino.de