Skip to content

Instantly share code, notes, and snippets.

@valotas
valotas / tomcat.sh
Created May 31, 2011 07:11
Tomcat init.d script
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
require 'ostruct'
class NestedStruct < OpenStruct
def method_missing(name, *)
super(:"#{name}=", NestedStruct.new) unless name.to_s =~ /=$/
super
end
def marshal_dump
dump = super