Skip to content

Commit ea56de9

Browse files
committed
cloudflared: add service.
This matches the upstream implementation that's installed when you do `cloudflared service install` but allows integration with `brew services` (and also therefore `brew bundle`).
1 parent 97b01e5 commit ea56de9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Formula/c/cloudflared.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class Cloudflared < Formula
44
url "https://github.com/cloudflare/cloudflared/archive/refs/tags/2024.11.1.tar.gz"
55
sha256 "1bf729c225701f6864b31bb6c251293caa06f9f1a6e671f3326dd20c3c9719ff"
66
license "Apache-2.0"
7+
revision 1
78
head "https://github.com/cloudflare/cloudflared.git", branch: "master"
89

910
bottle do
@@ -25,6 +26,13 @@ def install
2526
"PREFIX=#{prefix}"
2627
end
2728

29+
service do
30+
run [opt_bin/"cloudflared"]
31+
keep_alive successful_exit: false
32+
log_path var/"log/cloudflared.log"
33+
error_log_path var/"log/cloudflared.log"
34+
end
35+
2836
test do
2937
help_output = shell_output("#{bin}/cloudflared help")
3038
assert_match "cloudflared - Cloudflare's command-line tool and agent", help_output

0 commit comments

Comments
 (0)