Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded

This commit is contained in:
Coty Sutherland 2016-07-01 13:47:54 -04:00
parent b6ffa60f91
commit ea624b1371
3 changed files with 8 additions and 6 deletions

View File

@ -14,6 +14,7 @@ After=syslog.target network.target
Type=simple
EnvironmentFile=/etc/tomcat/tomcat.conf
Environment="NAME=" "USE_JSVC=true"
EnvironmentFile=-/etc/sysconfig/tomcat
ExecStart=/usr/libexec/tomcat/server start
ExecStop=/usr/libexec/tomcat/server stop

View File

@ -15,12 +15,12 @@ _save_function() {
run_jsvc(){
if [ -x /usr/bin/jsvc ]; then
TOMCAT_USER="tomcat"
JSVC="/usr/bin/jsvc"
JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out"
if [ "$1" = "stop" ]; then
JSVC_OPTS="${JSVC_OPTS} -stop"
TOMCAT_USER="${TOMCAT_USER:-tomcat}"
JSVC="/usr/bin/jsvc"
JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user ${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile ${CATALINA_BASE}/logs/catalina.out"
if [ "$1" = "stop" ]; then
JSVC_OPTS="${JSVC_OPTS} -stop"
fi
exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" ${OPTIONS} "${MAIN_CLASS}" "${@}"

View File

@ -689,6 +689,7 @@ fi
- Resolves: rhbz#1347864 The systemd service unit does not allow tomcat to shut down gracefully
- Resolves: rhbz#1347835 The security manager doesn't work correctly (JSPs cannot be compiled)
- Resolves: rhbz#1341853 rpm -V tomcat fails on /var/log/tomcat/catalina.out
- Resolves: rhbz#1341850 tomcat-jsvc.service has TOMCAT_USER value hard-coded
* Wed Mar 2 2016 Ivan Afonichev <ivan.afonichev@gmail.com> - 1:8.0.32-4
- Revert sysconfig migration changes, resolves: rhbz#1311771, rhbz#1311905