]> git.p6c8.net - selfforum.git/blob - selfforum-cgi/user/fo_sev.pl
umask 000; set
[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> #
8 # #
9 # Description: severancer script #
10 # #
11 ################################################################################
12
13 use strict;
14 use vars qw(
15 $Bin
16 $Shared
17 $Script
18 $Config
19 );
20
21 # locate the script
22 #
23 BEGIN {
24 my $null = $0; $null =~ s/\\/\//g; # for win :-(
25 $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.';
26 $Shared = "$Bin/../shared";
27 $Config = "$Bin/config";
28 $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null;
29
30 # my $null = $0;
31 # $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.';
32 # $Config = "$Bin/../../daten/forum/config";
33 # $Shared = "$Bin/../../cgi-shared";
34 # $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null;
35 }
36
37 # setting umask, remove or comment it, if you don't need
38 #
39 umask 006;
40
41 ################################################################################
42 #
43 # Version check
44 #
45 # last modified:
46 # $Date$ (GMT)
47 # by $Author$
48 #
49 sub VERSION {(q$Revision$ =~ /([\d.]+)\s*$/)[0] or '0.0'}
50
51 use lib "$Shared";
52 use CGI::Carp qw(fatalsToBrowser);
53
54 use Arc::Archive;
55 use Conf;
56 use Conf::Admin;
57 use Posting::Cache;
58
59 # load script configuration and admin default conf.
60 #
61 my $conf = read_script_conf ($Config, $Shared, $Script);
62 my $adminDefault = read_admin_conf ($conf -> {files} -> {adminDefault});
63
64 my $stat = cut_tail ({
65 forumFile => $conf->{files}->{forum},
66 messagePath => $conf->{files}->{messagePath},
67 archivePath => $conf->{files}->{archivePath},
68 archiveIndex => $conf->{files}->{archiveIndex},
69 lockFile => $conf->{files}->{sev_lock},
70 adminDefault => $adminDefault,
71 cachePath => $conf->{files}->{cachePath}
72 });
73 # die $stat->{(keys %$stat)[0]} if (%$stat);
74
75 #
76 #
77 ### end of fo_sev.pl ###########################################################

patrick-canterino.de