Skip to content

Commit

Permalink
Fix service definition in formulae
Browse files Browse the repository at this point in the history
  • Loading branch information
laggardkernel committed Oct 23, 2024
1 parent e5c8f72 commit c73067a
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 266 deletions.
19 changes: 2 additions & 17 deletions Formula/apm-server-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,8 @@ def post_install
(var/"log/apm-server").mkpath
end

plist_options :manual => "apm-server"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/apm-server</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"apm-server"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/apm-server-oss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,8 @@ def post_install
(var/"log/apm-server").mkpath
end

plist_options :manual => "apm-server"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/apm-server</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"apm-server"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/auditbeat-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,8 @@ def post_install
(var/"log/auditbeat").mkpath
end

plist_options :manual => "auditbeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/auditbeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"auditbeat"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/auditbeat-oss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,8 @@ def post_install
(var/"log/auditbeat").mkpath
end

plist_options :manual => "auditbeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/auditbeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"auditbeat"
end

test do
Expand Down
2 changes: 1 addition & 1 deletion Formula/elasticsearch-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def caveats
end

service do
run [opt_bin/"elasticsearch"]
run opt_bin/"elasticsearch"
working_dir var
log_path var/"log/elasticsearch.log"
error_log_path var/"log/elasticsearch.log"
Expand Down
19 changes: 2 additions & 17 deletions Formula/filebeat-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,8 @@ def install
EOS
end

plist_options :manual => "filebeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/filebeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"filebeat"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/filebeat-oss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,8 @@ def install
EOS
end

plist_options :manual => "filebeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/filebeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"filebeat"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/heartbeat-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,8 @@ def post_install
(var/"log/heartbeat").mkpath
end

plist_options :manual => "heartbeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/heartbeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"heartbeat"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/heartbeat-oss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,8 @@ def post_install
(var/"log/heartbeat").mkpath
end

plist_options :manual => "heartbeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/heartbeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"heartbeat"
end

test do
Expand Down
2 changes: 1 addition & 1 deletion Formula/kibana-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def caveats; <<~EOS
end

service do
run [opt_bin/"kibana"]
run opt_bin/"kibana"
working_dir var
log_path var/"log/kibana.log"
error_log_path var/"log/kibana.log"
Expand Down
35 changes: 5 additions & 30 deletions Formula/logstash-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,11 @@ def caveats; <<~EOS
EOS
end

plist_options :manual => "logstash"

def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/logstash</string>
</array>
<key>EnvironmentVariables</key>
<dict>
</dict>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>#{var}</string>
<key>StandardErrorPath</key>
<string>#{var}/log/logstash.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/logstash.log</string>
</dict>
</plist>
EOS
service do
run opt_bin/"logstash"
working_dir var
log_path var/"log/logstash.log"
error_log_path var/"log/logstash.log"
end

test do
Expand Down
35 changes: 5 additions & 30 deletions Formula/logstash-oss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,11 @@ def caveats; <<~EOS
EOS
end

plist_options :manual => "logstash"

def plist
<<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>#{plist_name}</string>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/logstash</string>
</array>
<key>EnvironmentVariables</key>
<dict>
</dict>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>#{var}</string>
<key>StandardErrorPath</key>
<string>#{var}/log/logstash.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/logstash.log</string>
</dict>
</plist>
EOS
service do
run opt_bin/"logstash"
working_dir var
log_path var/"log/logstash.log"
error_log_path var/"log/logstash.log"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/metricbeat-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,8 @@ def install
EOS
end

plist_options :manual => "metricbeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/metricbeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"metricbeat"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/metricbeat-oss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,8 @@ def install
EOS
end

plist_options :manual => "metricbeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/metricbeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"metricbeat"
end

test do
Expand Down
19 changes: 2 additions & 17 deletions Formula/packetbeat-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,8 @@ def install
EOS
end

plist_options :manual => "packetbeat"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>Program</key>
<string>#{opt_bin}/packetbeat</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
service do
run opt_bin/"packetbeat"
end

test do
Expand Down
Loading

0 comments on commit c73067a

Please sign in to comment.