Fix homebrew formula template
This commit is contained in:
parent
8cd80fcf83
commit
094705d76c
|
|
@ -22,10 +22,18 @@ class UnifiPoller < Formula
|
||||||
cd bin_path do
|
cd bin_path do
|
||||||
system "dep", "ensure"
|
system "dep", "ensure"
|
||||||
system "make", "install", "VERSION=#{version}", "PREFIX=#{prefix}", "ETC=#{etc}"
|
system "make", "install", "VERSION=#{version}", "PREFIX=#{prefix}", "ETC=#{etc}"
|
||||||
|
system "mkdir", "-p", "#{var}/log/unifi-poller"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
def caveats
|
||||||
plist_options :startup => true
|
s = <<-EOS
|
||||||
|
This application will not work until the config file has authentication
|
||||||
|
information for a Unifi Controller and an Influx Database. Edit the config
|
||||||
|
file at #{etc}/unifi-poller/up.conf then start the application with
|
||||||
|
brew services start unifi-poller ~ log file: #{var}/log/unifi-poller/log
|
||||||
|
The manual explains the config file options: man unifi-poller
|
||||||
|
EOS
|
||||||
|
end
|
||||||
|
|
||||||
def plist; <<-EOS
|
def plist; <<-EOS
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
@ -48,10 +56,6 @@ class UnifiPoller < Formula
|
||||||
<string>#{var}/log/unifi-poller/log</string>
|
<string>#{var}/log/unifi-poller/log</string>
|
||||||
<key>StandardOutPath</key>
|
<key>StandardOutPath</key>
|
||||||
<string>#{var}/log/unifi-poller/log</string>
|
<string>#{var}/log/unifi-poller/log</string>
|
||||||
<key>UserName</key>
|
|
||||||
<string>nobody</string>
|
|
||||||
<key>GroupName</key>
|
|
||||||
<string>nobody</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
EOS
|
EOS
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue