wido commented on a change in pull request #2197: CLOUDSTACK-10012: Embedded 
Jetty for CloudStack
URL: https://github.com/apache/cloudstack/pull/2197#discussion_r129029235
 
 

 ##########
 File path: packaging/cloud-management.sh
 ##########
 @@ -0,0 +1,58 @@
+#!/bin/bash
+
+ . /etc/cloudstack/management/tomcat6.conf
+SERVLETENGINE='jetty'
+# For SELinux we need to use 'runuser' not 'su'
+if [ -x "/sbin/runuser" ]; then
+    SU="/sbin/runuser -s /bin/sh"
+else
+    SU="/bin/su -s /bin/sh"
+fi
+
+touch $CLOUD_PID;
+chown $CLOUD_USER. $CLOUD_PID
+# CLASSPATH munging
+if [ -n "$JSSE_HOME" ]; then
+  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
+fi
+CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"
+
+CLOUD_HOME="/usr/share/cloudstack-management/"
+CLOUD_BASE=$CLOUD_HOME
+
+NAME="cloudstack-management"
+
+# Define the tomcat username
+CLOUD_USER="${CLOUD_USER:-cloud}"
+
+# Define the tomcat group
+CLOUD_GROUP="${CLOUD_GROUP:-`id -gn $CLOUD_USER`}"
+
+# Define the tomcat log file
+CLOUD_LOG="${CLOUD_LOG:-/var/log/${NAME}-initd.log}"
+
+# Define the pid file name
+# If change is needed, use sysconfig instead of here
+export CLOUD_PID="${CLOUD_PID:-/var/run/${NAME}.pid}"
+CLASSPATH="${CLASSPATH}:${CLOUD_HOME}/lib/jetty-runner.jar"
+CLASS="org.eclipse.jetty.runner.Runner --classes /etc/cloudstack/management 
--path /client $CLOUD_HOME/webapps/client  --stop-port 8888 --stop-key 
monkeystop"
+
+if [ "$1" = "start" ]; then
 
 Review comment:
   Shouldn't this just be a wrapper script that systemd can execute? As we want 
to start/stop everything through systemd
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to