35 lines
711 B
Ruby
35 lines
711 B
Ruby
|
|
module Setup
|
|
require_relative '../templates'
|
|
# dat execute postgres
|
|
# example.rcp
|
|
|
|
module PostgreSQL
|
|
extend Templates
|
|
|
|
|
|
|
|
# attr_accessor :te
|
|
|
|
def self.init_db(context)
|
|
system(" -D /opt/pgsql/16/data")
|
|
end
|
|
|
|
def self.install(context)
|
|
# puts context.bin_dir
|
|
#make_config
|
|
# pg_hba = render("pg_hba.conf")
|
|
#
|
|
# # test = render("test", te: "This is a test string")
|
|
# posgresql_conf = render("postgresql")
|
|
service = render(
|
|
"postgresql.service",
|
|
postgres_bin: File.join(context.bin_dir, "/bin/postgres"),
|
|
version: context.version,
|
|
database_dir: context.data_dir
|
|
)
|
|
puts service
|
|
|
|
end
|
|
end
|
|
end
|