Just have performed additional checks on clean VM (Ubuntu 16) Below script seems to work as expected
#!/bin/bash ### BEGIN INIT INFO # Provides: OpenMeetings # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop OpenMeetings server ### END INIT INFO DESC="OpenMeetings server" NAME=openmeetings OM_HOME=/opt/red5 ##todo PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin export CATALINA_PID=/var/run/${NAME}.pid start() { cd ${OM_HOME} touch ${CATALINA_PID} chown nobody ${CATALINA_PID} # HOME is required for jodConverter #/usr/bin/sudo -u nobody HOME=${OM_HOME}/temp CATALINA_PID=${CATALINA_PID=} ${OM_HOME}/bin/startup.sh /usr/bin/sudo -u nobody CATALINA_PID=${CATALINA_PID} ${OM_HOME}/bin/startup.sh } stop() { # TPID=$(ps aux | grep tomcat | awk 'NR==1{print $2}') # -- might be useful TPID=$(cat ${CATALINA_PID}) kill -9 ${TPID} } case "$1" in start) echo -n "Starting $DESC: $NAME" start echo "." ;; stop) echo -n "Stopping $DESC: $NAME" stop echo "." ;; restart|force-reload) echo -n "Restarting $DESC: $NAME" stop sleep 5 start echo "." ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 1 ;; esac On Fri, 18 Jan 2019 at 21:32, Maxim Solodovnik <solomax...@gmail.com> wrote: > Hello Aaron, > > I'm glad port issue was resolved. > According to startup/shutdown these scripts are bundled with Tomcat and > should work > I'm planning to investigate what is wrong, since it affects demo server > (I'm using Ubuntu and something like this should work [1]) > Unfortunately my time is very limited these days :( > > What I already have tried: > 1) use catalina.sh to start Tomcat, provide valid CATALINA_PID > 2) use `kill -9 <with-saved-pid>` > for some reason this is not working right now (was working as expected) > and this method will not work on non-debian distros and other OSes > Additional investigation is required > > [1] https://linuxize.com/post/how-to-install-tomcat-9-on-ubuntu-18-04/ > > On Fri, 18 Jan 2019 at 19:15, Aaron Hepp <aaron.h...@gmail.com> wrote: > >> downloaded and unzipped the latest nightly build for OM5 (#2690). cd to >> /opt/om5/bin and ran sh startup.sh. Service started up and nmap showed >> port 5080 and 8009 listening. Redirection worked to port 5443. Issue I >> was having with the cert not working was failed to change the password for >> the keystore file in server.xml. Once that changed no longer had the bad >> cert error. I was able to change the default ports in server.xml and >> listening and redirection worked fine. >> >> Question are you supposed to start and stop using the startup.sh and >> shutdown.sh files in om5/bin? startup works fine and gets it running, but >> when running shutdown it stops listening on the ports, but leaves java >> process running in the background. If you run startup again it creates a >> second java process (see attached), and each time you shutdown and start it >> creates a new. >> >> > > -- > WBR > Maxim aka solomax > -- WBR Maxim aka solomax