lib/liberty_buildpack/jre/openjdk.rb
# Filename of killjava script used to kill the JVM on OOM.
Filename of killjava script used to kill the JVM on OOM.
Filename of killjava script used to kill the JVM on OOM .
def copy_killjava_script
      resources = File.expand_path(RESOURCES, File.dirname(__FILE__))
      killjava_file_content = File.read(File.join(resources, KILLJAVA_FILE_NAME))
      updated_content = killjava_file_content.gsub(/@@LOG_FILE_NAME@@/, LibertyBuildpack::Diagnostics::LOG_FILE_NAME)
      diagnostic_dir = LibertyBuildpack::Diagnostics.get_diagnostic_directory @app_dir
      FileUtils.mkdir_p diagnostic_dir
      File.open(File.join(diagnostic_dir, KILLJAVA_FILE_NAME), 'w', 0o755) do |file|
        file.write updated_content
      end
    end
def copy_killjava_script resources = File . expand_path ( RESOURCES , File . dirname ( __FILE__ ) ) killjava_file_content = File . read ( File . join ( resources , KILLJAVA_FILE_NAME ) ) updated_content = killjava_file_content . gsub ( / @@LOG_FILE_NAME@@ / , LibertyBuildpack :: Diagnostics :: LOG_FILE_NAME ) diagnostic_dir = LibertyBuildpack :: Diagnostics . get_diagnostic_directory @app_dir FileUtils . mkdir_p diagnostic_dir File . open ( File . join ( diagnostic_dir , KILLJAVA_FILE_NAME ) , 'w' , 0o755 ) do | file | file . write updated_content end end
Filename of killjava script used to kill the JVM on OOM.
Filename of killjava script used to kill the JVM on OOM .