version 1.43.2.9, 2021/03/11 20:45:03
|
version 1.43.2.10, 2021/03/12 23:17:04
|
Line 69 http://www.lon-capa.org/
|
Line 69 http://www.lon-capa.org/
|
# Generated from doc/loncapafiles/webserver.piml |
# Generated from doc/loncapafiles/webserver.piml |
use Socket; |
use Socket; |
use Sys::Hostname::FQDN(); |
use Sys::Hostname::FQDN(); |
|
use File::Spec; |
|
use Cwd(); |
|
|
# For ubuntu 14 and later check for loncapa.conf in sites-available, |
# For ubuntu 14 and later check for loncapa.conf in sites-available, |
# and conf-available, and for symlinks in sites-enabled, and conf-enabled |
# and conf-available, and for symlinks in sites-enabled, and conf-enabled |
Line 77 if ('<DIST />' =~ /^ubuntu(\d+)$/) {
|
Line 79 if ('<DIST />' =~ /^ubuntu(\d+)$/) {
|
if ($version > 12) { |
if ($version > 12) { |
if (-l '/etc/apache2/conf-enabled/loncapa.conf') { |
if (-l '/etc/apache2/conf-enabled/loncapa.conf') { |
my $linkfname = readlink('/etc/apache2/conf-enabled/loncapa.conf'); |
my $linkfname = readlink('/etc/apache2/conf-enabled/loncapa.conf'); |
|
if ($linkfname ne '') { |
|
$linkfname = Cwd::abs_path(File::Spec->rel2abs($linkfname,'/etc/apache2/conf-enabled')); |
|
} |
unless ($linkfname eq '/etc/apache2/conf-available/loncapa.conf') { |
unless ($linkfname eq '/etc/apache2/conf-available/loncapa.conf') { |
unlink('/etc/apache2/conf-enabled/loncapa.conf'); |
unlink('/etc/apache2/conf-enabled/loncapa.conf'); |
} |
} |
Line 86 if ('<DIST />' =~ /^ubuntu(\d+)$/) {
|
Line 91 if ('<DIST />' =~ /^ubuntu(\d+)$/) {
|
} |
} |
unless (-l '/etc/apache2/conf-enabled/loncapa.conf') { |
unless (-l '/etc/apache2/conf-enabled/loncapa.conf') { |
if (-e '/etc/apache2/conf-available/loncapa.conf') { |
if (-e '/etc/apache2/conf-available/loncapa.conf') { |
symlink('/etc/apache2/conf-available/loncapa.conf','/etc/apache2/conf-enabled/loncapa.conf'); |
my $currdir = Cwd::getcwd(); |
|
if ($currdir ne '') { |
|
chdir('/etc/apache2/conf-enabled'); |
|
symlink('../conf-available/loncapa.conf','loncapa.conf'); |
|
chdir($currdir); |
|
} |
} |
} |
} |
} |
if (-l '/etc/apache2/sites-enabled/000-default.conf') { |
if (-l '/etc/apache2/sites-enabled/000-default.conf') { |
my $linkfname = readlink('/etc/apache2/sites-enabled/000-default.conf'); |
my $linkfname = readlink('/etc/apache2/sites-enabled/000-default.conf'); |
if ($linkfname eq '/etc/apache2/sites-available/loncapa') { |
if ($linkfname ne '') { |
|
$linkfname = Cwd::abs_path(File::Spec->rel2abs($linkfname,'/etc/apache2/sites-enabled')); |
|
} |
|
if (($linkfname eq '/etc/apache2/sites-available/loncapa') || |
|
($linkname eq '/etc/apache2/sites-available/000-default.conf')) { |
unlink('/etc/apache2/sites-enabled/000-default.conf'); |
unlink('/etc/apache2/sites-enabled/000-default.conf'); |
} |
} |
} |
} |
Line 100 if ('<DIST />' =~ /^ubuntu(\d+)$/) {
|
Line 114 if ('<DIST />' =~ /^ubuntu(\d+)$/) {
|
} |
} |
if (-l '/etc/apache2/sites-enabled/loncapa.conf') { |
if (-l '/etc/apache2/sites-enabled/loncapa.conf') { |
my $linkfname = readlink('/etc/apache2/sites-enabled/loncapa.conf'); |
my $linkfname = readlink('/etc/apache2/sites-enabled/loncapa.conf'); |
|
if ($linkfname ne '') { |
|
$linkfname = Cwd::abs_path(File::Spec->rel2abs($linkfname,'/etc/apache2/sites-enabled')); |
|
} |
unless ($linkfname eq '/etc/apache2/sites-available/loncapa.conf') { |
unless ($linkfname eq '/etc/apache2/sites-available/loncapa.conf') { |
unlink('/etc/apache2/sites-enabled/loncapa.conf'); |
unlink('/etc/apache2/sites-enabled/loncapa.conf'); |
} |
} |
} |
} |
unless (-l '/etc/apache2/sites-enabled/loncapa.conf') { |
unless (-l '/etc/apache2/sites-enabled/loncapa.conf') { |
if (-e '/etc/apache2/sites-available/loncapa.conf') { |
if (-e '/etc/apache2/sites-available/loncapa.conf') { |
symlink('/etc/apache2/sites-available/loncapa.conf','/etc/apache2/sites-enabled/loncapa.conf'); |
my $currdir = Cwd::getcwd(); |
|
if ($currdir ne '') { |
|
chdir('/etc/apache2/sites-enabled'); |
|
symlink('../sites-available/loncapa.conf','loncapa.conf'); |
|
chdir($currdir); |
|
} |
} |
} |
} |
} |
} |
} |