From fd5fe75b88810c3b42ae8c1daaefb821a33e6b94 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 20 Jul 2017 08:13:41 +0200 Subject: Added Tomcat scripts. --- scripts/tomcat-clone-restart.sh | 4 ++++ scripts/tomcat-clone-start.sh | 5 +++++ scripts/tomcat-clone-stop.sh | 5 +++++ scripts/tomcat-download.sh | 18 ++++++++++++++++++ scripts/tomcat-log.sh | 3 +++ scripts/tomcat-status.sh | 5 +++++ 6 files changed, 40 insertions(+) create mode 100755 scripts/tomcat-clone-restart.sh create mode 100755 scripts/tomcat-clone-start.sh create mode 100755 scripts/tomcat-clone-stop.sh create mode 100755 scripts/tomcat-download.sh create mode 100755 scripts/tomcat-log.sh create mode 100755 scripts/tomcat-status.sh diff --git a/scripts/tomcat-clone-restart.sh b/scripts/tomcat-clone-restart.sh new file mode 100755 index 0000000..f6a6c39 --- /dev/null +++ b/scripts/tomcat-clone-restart.sh @@ -0,0 +1,4 @@ +#!/bin/sh -x + +./tomcat-clone-stop.sh +./tomcat-clone-start.sh diff --git a/scripts/tomcat-clone-start.sh b/scripts/tomcat-clone-start.sh new file mode 100755 index 0000000..cb4b22e --- /dev/null +++ b/scripts/tomcat-clone-start.sh @@ -0,0 +1,5 @@ +#!/bin/sh -x + +INSTANCE_NAME=pki-clone + +systemctl start pki-tomcatd@$INSTANCE_NAME.service diff --git a/scripts/tomcat-clone-stop.sh b/scripts/tomcat-clone-stop.sh new file mode 100755 index 0000000..26b1535 --- /dev/null +++ b/scripts/tomcat-clone-stop.sh @@ -0,0 +1,5 @@ +#!/bin/sh -x + +INSTANCE_NAME=pki-clone + +systemctl stop pki-tomcatd@$INSTANCE_NAME.service diff --git a/scripts/tomcat-download.sh b/scripts/tomcat-download.sh new file mode 100755 index 0000000..1dd91bf --- /dev/null +++ b/scripts/tomcat-download.sh @@ -0,0 +1,18 @@ +#!/bin/sh -x + +mkdir -p ~/Downloads +cd ~/Downloads + +#https://kojipkgs.fedoraproject.org/packages/pki-core/10.3.1/1.fc24/noarch/pki-base-10.3.1-1.fc24.noarch.rpm +BASE_URL=http://kojipkgs.fedoraproject.org/packages + +PACKAGE=tomcat +VERSION=7.0.69 +RELEASE=2 +OS=el7 + +wget $BASE_URL/$PACKAGE/$VERSION/$RELEASE.$OS/noarch/tomcat-$VERSION-$RELEASE.$OS.noarch.rpm +wget $BASE_URL/$PACKAGE/$VERSION/$RELEASE.$OS/noarch/tomcat-el-2.2-api-$VERSION-$RELEASE.$OS.noarch.rpm +wget $BASE_URL/$PACKAGE/$VERSION/$RELEASE.$OS/noarch/tomcat-jsp-2.2-api-$VERSION-$RELEASE.$OS.noarch.rpm +wget $BASE_URL/$PACKAGE/$VERSION/$RELEASE.$OS/noarch/tomcat-lib-$VERSION-$RELEASE.$OS.noarch.rpm +wget $BASE_URL/$PACKAGE/$VERSION/$RELEASE.$OS/noarch/tomcat-servlet-3.0-api-$VERSION-$RELEASE.$OS.noarch.rpm diff --git a/scripts/tomcat-log.sh b/scripts/tomcat-log.sh new file mode 100755 index 0000000..008c8d0 --- /dev/null +++ b/scripts/tomcat-log.sh @@ -0,0 +1,3 @@ +#!/bin/sh -x + +journalctl -f -u pki-tomcatd@pki-tomcat.service diff --git a/scripts/tomcat-status.sh b/scripts/tomcat-status.sh new file mode 100755 index 0000000..99590ee --- /dev/null +++ b/scripts/tomcat-status.sh @@ -0,0 +1,5 @@ +#!/bin/sh -x + +INSTANCE_NAME=pki-tomcat + +systemctl status pki-tomcatd@$INSTANCE_NAME.service -- cgit