Commit 537f911e authored by Cédric BRINER's avatar Cédric BRINER Committed by Cédric BRINER
Browse files

tomcat7 admin

parent 86556a71
......@@ -850,7 +850,8 @@ function sync
echo -e " \e[34m- dpkgs\e[0m"
something_to_install=False
t=$(mktemp --suffix .idp-sync)
for p in tomcat7 openjdk-7-jdk apache2 mysql-server libmysql-java ruby virtualenv ipython
for p in tomcat7 openjdk-7-jdk apache2 mysql-server libmysql-java ruby \
virtualenv ipython libtcnative-1 tomcat7-admin
do
if ssh root@${h} "dpkg -l ${p} &> /dev/null"
then
......@@ -1342,6 +1343,29 @@ EOF
sscp "default/tomcat7" /etc/default/tomcat7 root@${h}:/etc/default/tomcat7
sscp "tomcat idp.xml" /etc/tomcat7/Catalina/localhost/idp.xml root@${h}:/etc/tomcat7/Catalina/localhost/idp.xml
sscp "tomcat7 server.xml" /etc/tomcat7/server.xml root@${h}:/etc/tomcat7/server.xml
sscp "tomcat7 tomcat-users.xml" /etc/tomcat7/tomcat-users.xml root@${h}:/etc/tomcat7/tomcat-users.xml
sscp "tomcat7 manager.xml" /etc/tomcat7/Catalina/localhost/manager.xml root@${h}:/etc/tomcat7/Catalina/localhost/manager.xml
# check that tomcat7 user is in group ssl-cert
pb "Does tomcat7 is un group ssl-cert:"
if ssh root@{h} "id tomcat7|grep -Fb ssl-cert"; then
pg "Yes !" | indent 3
else:
if ssh root@{h} "- adduser tomcat7 ssl-cert" | indent 3; then
pg "Done !" | indent 6
else
pr "- Unable to adduser tomcat7 in group ssl-cert witch cmd (adduser tomcat7 ssl-cert)" | indent 6
pb "Exit !" | indent 6
# do link for /etc/tomcat7/server.xml
pb "do link for /etc/tomcat7/server.xml credentials"
ltp_suffix=""
if [[ $ltp != "prd" ]];then
ltp_suffix="-${ltp}"
pb "- server.crt"
make_distant_link "${h}" /etc/ssl/certs/idp${ltp_suffix}.unige.ch.crt /etc/ssl/certs/server.crt | indent 6
pb "- server_chain.crt"
make_distant_link "${h}" /etc/ssl/certs/idp${ltp_suffix}.unige.ch.chain_crt /etc/ssl/certs/server.chain_crt | indent 6
pb "- server.key"
make_distant_link "${h}" /etc/ssl/private/idp${ltp_suffix}.unige.ch.chain_crt /etc/ssl/certs/server.key | indent 6
# rebuild tomcat
echo -e " \e[34m- rebuild war (rebuild the war, stop tomcat, remove old war, start tomcat)\e[0m"
if test ${RESTART_DAEMON} = "True"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment