-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaegis-aggregator.rb
56 lines (50 loc) · 1.4 KB
/
aegis-aggregator.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
require 'formula'
class AegisAggregator < Formula
desc "Aegis Aggregator service"
homepage "https://sageaxcess.com"
url "http://build.sageaxcess.com/brew/aegis-aggregator_1.0.2_x86_64.tar.gz"
sha256 "61d800959bbe5c4b9d80d53b2b6a8679a683ca968fd309a6a769ee5bdf44364a"
version "1.0.2"
depends_on "msgpack"
depends_on "zeromq"
def install
conf = prefix/"conf"
bin.install Dir["1.0.2/bin/*"]
conf.install Dir["1.0.2/conf/*"]
end
def post_install
queue = prefix/"queue"
logs = prefix/"logs"
queue.mkpath
logs.mkpath
end
plist_options :startup => true
def plist; <<-EOS.undent
<?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>Label</key>
<string>#{plist_name}</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>#{opt_bin}/AegisAggregator</string>
</array>
<key>WorkingDirectory</key>
<string>#{opt_prefix}</string>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
</dict>
</plist>
EOS
end
# test do
# system "#{bin}/AegisAggregator", "--version"
# end
end