mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 20:03:24 +00:00
Added common lib support for tomcat
svn path=/nixos/trunk/; revision=12511
This commit is contained in:
parent
64fc690afa
commit
afdfff7ed8
@ -1469,6 +1469,11 @@
|
||||
default = "";
|
||||
description ="Location where shared libraries are stored. Leave empty to use the baseDir.";
|
||||
};
|
||||
|
||||
commonLibFrom = mkOption {
|
||||
default = "";
|
||||
description ="Location where common libraries are stored. Leave empty to use the baseDir.";
|
||||
};
|
||||
};
|
||||
|
||||
disnix = {
|
||||
|
@ -34,6 +34,7 @@ in
|
||||
then
|
||||
mkdir -p ${cfg.baseDir}/webapps
|
||||
mkdir -p ${cfg.baseDir}/shared
|
||||
mkdir -p ${cfg.baseDir}/lib
|
||||
cp -av ${pkgs.tomcat6}/{conf,temp,logs} ${cfg.baseDir}
|
||||
fi
|
||||
|
||||
@ -48,7 +49,7 @@ in
|
||||
cp -rL $i ${cfg.baseDir}/webapps
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Fix permissions
|
||||
|
||||
chown -R ${cfg.user} ${cfg.baseDir}
|
||||
@ -63,6 +64,22 @@ in
|
||||
chmod -v 644 $i
|
||||
done
|
||||
|
||||
# Deploy all common libraries
|
||||
|
||||
rm -rf ${cfg.baseDir}/lib/*
|
||||
|
||||
if test "${cfg.commonLibFrom}" = ""
|
||||
then
|
||||
commonLibFrom="${pkgs.tomcat6}/lib";
|
||||
else
|
||||
commonLibFrom="${cfg.commonLibFrom}";
|
||||
fi
|
||||
|
||||
for i in $commonLibFrom/*.jar
|
||||
do
|
||||
ln -s $i ${cfg.baseDir}/lib
|
||||
done
|
||||
|
||||
# Deploy all shared libraries
|
||||
|
||||
if ! test "${cfg.sharedLibFrom}" = ""
|
||||
|
Loading…
Reference in New Issue
Block a user