summaryrefslogtreecommitdiffstats
path: root/base/tps-tomcat/shared/conf/etc/init.d/pki-tpsd
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-08-13 15:56:50 -0400
committerEndi S. Dewata <edewata@redhat.com>2013-08-15 12:26:12 -0400
commit17d6be4d85741bffa21d93aceaff00223bc77dec (patch)
tree7703eba9059076e47c7262120150292270c54d15 /base/tps-tomcat/shared/conf/etc/init.d/pki-tpsd
parent4ab7fdc3c08a6279d838ae795889924e9fc306cb (diff)
downloadpki-17d6be4d85741bffa21d93aceaff00223bc77dec.tar.gz
pki-17d6be4d85741bffa21d93aceaff00223bc77dec.tar.xz
pki-17d6be4d85741bffa21d93aceaff00223bc77dec.zip
Moved Tomcat-based TPS to separate folder.
The source files for the new Tomcat-based TPS has been moved from base/tps to base/tps-tomcat. The new TPS will now be build in pki-core and packaged in pki-tps-tomcat RPM. The old TPS and RA have been restored to the previous state before adding the new TPS. Once the new TPS is complete, the old TPS can be removed, the new TPS can be moved back to base/tps and the package can be renamed back to pki-tps. Ticket #702
Diffstat (limited to 'base/tps-tomcat/shared/conf/etc/init.d/pki-tpsd')
-rwxr-xr-xbase/tps-tomcat/shared/conf/etc/init.d/pki-tpsd86
1 files changed, 86 insertions, 0 deletions
diff --git a/base/tps-tomcat/shared/conf/etc/init.d/pki-tpsd b/base/tps-tomcat/shared/conf/etc/init.d/pki-tpsd
new file mode 100755
index 000000000..7b991f39c
--- /dev/null
+++ b/base/tps-tomcat/shared/conf/etc/init.d/pki-tpsd
@@ -0,0 +1,86 @@
+#!/bin/bash
+#
+# --- BEGIN COPYRIGHT BLOCK ---
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2007-2010 Red Hat, Inc.
+# All rights reserved.
+# --- END COPYRIGHT BLOCK ---
+#
+# pki-tpsd Startup script for pki-tps with tomcat7
+#
+# chkconfig: - 84 16
+# description: Token Processing Service (Tomcat 7.0)
+# processname: pki-tpsd
+# piddir: /var/run/pki/tps
+#
+
+PROG_NAME=`basename $0`
+SERVICE_NAME="pki-tpsd"
+SERVICE_PROG="/sbin/service"
+PKI_PATH="/usr/share/pki/tps"
+PKI_REGISTRY="/etc/sysconfig/pki/tps"
+PKI_TYPE="pki-tps"
+PKI_TOTAL_PORTS=6
+
+# Avoid using 'systemctl' for now
+SYSTEMCTL_SKIP_REDIRECT=1
+export SYSTEMCTL_SKIP_REDIRECT
+
+# Disallow 'others' the ability to 'write' to new files
+umask 00002
+
+command="$1"
+pki_instance="$2"
+
+# Source function library.
+. /etc/init.d/functions
+
+# Source the PKI function library
+. /usr/share/pki/scripts/functions
+
+# See how we were called.
+case $command in
+ status)
+ registry_status
+ exit $?
+ ;;
+ start)
+ start
+ exit $?
+ ;;
+ restart)
+ restart
+ exit $?
+ ;;
+ stop)
+ stop
+ exit $?
+ ;;
+ condrestart|force-restart|try-restart)
+ [ ! -f ${lockfile} ] || restart
+ exit $?
+ ;;
+ reload)
+ echo "The 'reload' action is an unimplemented feature."
+ exit ${default_error}
+ ;;
+ *)
+ echo "unknown action ($command)"
+ usage
+ echo "where valid instance names include:"
+ list_instances
+ exit ${default_error}
+ ;;
+esac