diff --git a/init/launchd/com.github.davidnewhall.unifi-poller.plist b/init/launchd/com.github.davidnewhall.unifi-poller.plist
index addc8ff1..d8a18294 100644
--- a/init/launchd/com.github.davidnewhall.unifi-poller.plist
+++ b/init/launchd/com.github.davidnewhall.unifi-poller.plist
@@ -15,8 +15,8 @@
KeepAlive
StandardErrorPath
- /usr/local/var/log/unifi-poller/log
+ /usr/local/var/log/unifi-poller.log
StandardOutPath
- /usr/local/var/log/unifi-poller/log
+ /usr/local/var/log/unifi-poller.log
diff --git a/templates/unifi-poller.rb.tmpl b/templates/unifi-poller.rb.tmpl
index e378e334..bd202fee 100644
--- a/templates/unifi-poller.rb.tmpl
+++ b/templates/unifi-poller.rb.tmpl
@@ -25,7 +25,7 @@ class UnifiPoller < Formula
# If this fails, the user gets a nice big warning about write permissions on their
# [/usr/local/]var/log folder. The alternative could be letting the app silently
# fail to start when it cannot write logs. This is better. Fix perms; reinstall.
- system "mkdir", "-p", "#{var}/log/unifi-poller"
+ system "touch", "#{var}/log/unifi-poller.log"
end
end
def caveats
@@ -33,7 +33,7 @@ class UnifiPoller < Formula
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
+ brew services start unifi-poller ~ log file: #{var}/log/unifi-poller.log
The manual explains the config file options: man unifi-poller
EOS
end
@@ -56,9 +56,9 @@ class UnifiPoller < Formula
KeepAlive
StandardErrorPath
- #{var}/log/unifi-poller/log
+ #{var}/log/unifi-poller.log
StandardOutPath
- #{var}/log/unifi-poller/log
+ #{var}/log/unifi-poller.log
EOS