mdsh.com/wiki


RecentChanges

TextFormattingRules
AllWikiTopics
OrphanedWikiTopics
ToDoWikiTopics
WikiLockList
RSS
Export2HTML

WikiSearch

SetUsername

StartingPoints
Home
OSX:StartupItems

http://www.oreillynet.com/pub/a/mac/2003/10/21/startup.html

macmini:~ mdsh$ cat /Library/StartupItems/Tomcat/Tomcat

#!/bin/sh

##
# Tomcat servlet container
##

. /etc/rc.common

export SERVICE_NAME="Tomcat Servlet Container"
export CATALINA_HOME=/usr/local/tomcat
export JAVA_HOME=/usr


StartService ()
{
      echo "Starting ${SERVICE_NAME}"
      $CATALINA_HOME/bin/startup.sh
}

StopService ()
{
      echo "Stopping ${SERVICE_NAME}"
      $CATALINA_HOME/bin/shutdown.sh
}

RestartService ()
{
      echo "restarting ${SERVICE_NAME}"
      $CATALINA_HOME/bin/startup.sh
      sleep 2
      $CATALINA_HOME/bin/shutdown.sh
}

RunService "$1"


macmini:~ mdsh$ cat /Library/StartupItems/Tomcat/StartupParameters.plist
{
  Description    = "Tomcat Servlet Engine";
  Provides      = ("Servlet Engine");
  Requires      = ("Web Server");
  Uses        = ("Disks""NFS");
  OrderPreference = "None";
}


OSX:StartupItems is mentioned on: OSX


VeryQuickWiki Version 2.8.1 | Admin

All contents copyright mdsh.com (C) 2011-2023.