Initial commit.
This commit is contained in:
55
lib/perl5/Selima/startup.pl
Normal file
55
lib/perl5/Selima/startup.pl
Normal file
@@ -0,0 +1,55 @@
|
||||
#! /usr/bin/perl -w
|
||||
# Selima Website Content Management System
|
||||
# startup.pl: The mod_perl environment initializer.
|
||||
|
||||
# Copyright (c) 2004-2018 imacat.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Author: imacat <imacat@mail.imacat.idv.tw>
|
||||
# First written: 2004-09-20
|
||||
|
||||
use 5.005;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
# Add the library directory to @INC
|
||||
# FindBin cannot be used here, for $0 is /dev/null.
|
||||
use lib qw(/srv/www/lib/perl5);
|
||||
use lib qw(/srv/www/htdocs/imacat/magicat/lib/perl5);
|
||||
use lib qw(/srv/www/htdocs/wov/magicat/lib/perl5);
|
||||
use lib qw(/srv/www/htdocs/emily/magicat/lib/perl5);
|
||||
use lib qw(/srv/www/htdocs/htc/magicat/lib/perl5);
|
||||
use lib qw(/srv/www/htdocs/emandy/magicat/lib/perl5);
|
||||
# Pre-load perl modules
|
||||
use Selima qw();
|
||||
use Selima::imacat qw();
|
||||
use Selima::wov qw();
|
||||
use Selima::emily qw();
|
||||
use Selima::htc qw();
|
||||
use Selima::emandy qw();
|
||||
use Selima::Init qw();
|
||||
BEGIN {
|
||||
unless (exists $ENV{"MOD_PERL_API_VERSION"} && $ENV{"MOD_PERL_API_VERSION"} >= 2) {
|
||||
require Selima::AuthDig;
|
||||
}
|
||||
}
|
||||
use Selima::XHTML qw();
|
||||
# Make the session directory
|
||||
if (!-e $Selima::Session::DIR) {
|
||||
mkdir $Selima::Session::DIR;
|
||||
chown(@_ = (getpwnam "nobody")[2,3], $Selima::Session::DIR);
|
||||
chmod 0700, $Selima::Session::DIR;
|
||||
}
|
||||
|
||||
return 1
|
||||
Reference in New Issue
Block a user