Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Filebeat macOS service definition #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions Formula/filebeat-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,11 @@ 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
# Defining macOS service
# See https://docs.brew.sh/Formula-Cookbook#service-files
service do
run [opt_bin/"filebeat"]
keep_alive true
end

test do
Expand Down
22 changes: 5 additions & 17 deletions Formula/filebeat-oss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,11 @@ 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
# Defining macOS service
# See https://docs.brew.sh/Formula-Cookbook#service-files
service do
run [opt_bin/"filebeat"]
keep_alive true
end

test do
Expand Down