builder/extra/tools/ruby-tpm/configure/deployment_steps/configure_deployment_core.rb
def write_svc_properties(name, applier)
    dataservice = @config.getProperty(DATASERVICENAME)
    props_name = name + ".properties"
    svc_properties_dir = "#{get_deployment_basedir()}/cluster-home/conf/cluster/" + dataservice + "/service/"
    svc_properties = svc_properties_dir + "/" + props_name

    # Ensure services properties directory exists.
    mkdir_if_absent(svc_properties_dir)

    # Create service properties file.
    out = File.open(svc_properties, "w")
    out.puts "# #{props_name}"
    out.puts "name=#{name}"
    
    {
      REPL_DBSERVICE_START => "start",
      REPL_DBSERVICE_STOP => "stop",
      REPL_DBSERVICE_RESTART => "restart",
      REPL_DBSERVICE_STATUS => "status"
    }.each{
      |subcommand_key, subcommand|
      
      key = applier.get_applier_key(subcommand_key)
      shell_command = @config.getProperty(key)
      out.puts "command.#{subcommand}=#{get_svc_command(shell_command)}"
    }
    
    out.puts "# AUTO-CONFIGURED: #{DateTime.now}"
    out.chmod(0755)
    out.close
    info "GENERATED FILE: " + svc_properties
    WatchFiles.watch_file(svc_properties, @config)
  end
# Generate a cluster service properties file for a system service.
Generate a cluster service properties file for a system service.
Generate a cluster service properties file for a system service .
def write_svc_properties(name, applier)
    dataservice = @config.getProperty(DATASERVICENAME)
    props_name = name + ".properties"
    svc_properties_dir = "#{get_deployment_basedir()}/cluster-home/conf/cluster/" + dataservice + "/service/"
    svc_properties = svc_properties_dir + "/" + props_name
    mkdir_if_absent(svc_properties_dir)
    out = File.open(svc_properties, "w")
    out.puts "# #{props_name}"
    out.puts "name=#{name}"
    {
      REPL_DBSERVICE_START => "start",
      REPL_DBSERVICE_STOP => "stop",
      REPL_DBSERVICE_RESTART => "restart",
      REPL_DBSERVICE_STATUS => "status"
    }.each{
      |subcommand_key, subcommand|
      key = applier.get_applier_key(subcommand_key)
      shell_command = @config.getProperty(key)
      out.puts "command.#{subcommand}=#{get_svc_command(shell_command)}"
    }
    out.puts "# AUTO-CONFIGURED: #{DateTime.now}"
    out.chmod(0755)
    out.close
    info "GENERATED FILE: " + svc_properties
    WatchFiles.watch_file(svc_properties, @config)
  end
def write_svc_properties ( name , applier ) dataservice = @config . getProperty ( DATASERVICENAME ) props_name = name + ".properties" svc_properties_dir = "#{get_deployment_basedir()}/cluster-home/conf/cluster/" + dataservice + "/service/" svc_properties = svc_properties_dir + "/" + props_name mkdir_if_absent ( svc_properties_dir ) out = File . open ( svc_properties , "w" ) out . puts "# #{props_name}" out . puts "name=#{name}" { REPL_DBSERVICE_START => "start" , REPL_DBSERVICE_STOP => "stop" , REPL_DBSERVICE_RESTART => "restart" , REPL_DBSERVICE_STATUS => "status" } . each { | subcommand_key , subcommand | key = applier . get_applier_key ( subcommand_key ) shell_command = @config . getProperty ( key ) out . puts "command.#{subcommand}=#{get_svc_command(shell_command)}" } out . puts "# AUTO-CONFIGURED: #{DateTime.now}" out . chmod ( 0755 ) out . close info "GENERATED FILE: " + svc_properties WatchFiles . watch_file ( svc_properties , @config ) end
Generate a cluster service properties file for a system service.
Generate a cluster service properties file for a system service .
# Ensure services properties directory exists. # Create service properties file.
name
applier