Skip to content

Commit

Permalink
Install lavinmq config (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
spuun authored Nov 5, 2024
1 parent 4cf511f commit 7546dd0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Formula/lavinmq.rb
Original file line number Diff line number Diff line change
@@ -26,10 +26,21 @@ def install
man1.install "man1/lavinmq.1"
man1.install "man1/lavinmqctl.1"
man1.install "man1/lavinmqperf.1"

unless lavinmq_config.exist?
pkgetc.install "extras/lavinmq.ini"
inreplace lavinmq_config do |s|
s.gsub!(/^data_dir.*/, "data_dir = #{var}/lavinmq")
end
end
end

def lavinmq_config
pkgetc/"lavinmq.ini"
end

service do
run [opt_bin / "lavinmq", "-D", var / "lavinmq"]
run [opt_bin/"lavinmq", "-c", etc/"lavinmq/lavinmq.ini"]
end

test do

0 comments on commit 7546dd0

Please sign in to comment.