Upgrade dep, more readme updates.
This commit is contained in:
parent
34bda3d10b
commit
d09bd354f4
|
|
@ -2,59 +2,78 @@
|
|||
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:f5c630587244a2d10773eeb4ff84bb28e7a1d12833bb79136fff894193df3072"
|
||||
name = "github.com/golift/unifi"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "24c7eb106b3c9ff4260c88b54c02f0f86301fa75"
|
||||
version = "0.9.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:718c57979a9197414a044fff2028e57cb9fe145069e4f507059755bfe87f1bfe"
|
||||
name = "github.com/influxdata/influxdb"
|
||||
packages = [
|
||||
"client/v2",
|
||||
"models",
|
||||
"pkg/escape"
|
||||
"pkg/escape",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "698dbc789aff13c2678357a6b93ff73dd7136571"
|
||||
version = "v1.7.3"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:937258f1293bc9295b4789b0abea5b4ec030e3caecb65a4e1dc0b6999957a5ed"
|
||||
name = "github.com/influxdata/platform"
|
||||
packages = [
|
||||
"models",
|
||||
"pkg/escape"
|
||||
"pkg/escape",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "0f79e4ea3248354c789cba274542e0a8e55971db"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:b56c589214f01a5601e0821387db484617392d0042f26234bf2da853a2f498a1"
|
||||
name = "github.com/naoina/go-stringutil"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "6b638e95a32d0c1131db0e7fe83775cbea4a0d0b"
|
||||
version = "v0.1.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:f58c3d0e46b64878d00652fedba24ee879725191ab919dca7b62586859281c04"
|
||||
name = "github.com/naoina/toml"
|
||||
packages = [
|
||||
".",
|
||||
"ast"
|
||||
"ast",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "e6f5723bf2a66af014955e0888881314cf294129"
|
||||
version = "v0.1.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:8fd3a15613c7e70cceff3aa03dd57560dba87c4868864e397d5eb2f14addd3f5"
|
||||
name = "github.com/ogier/pflag"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "32a05c62658bd1d7c7e75cbc8195de5d585fde0f"
|
||||
version = "v0.0.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b"
|
||||
name = "github.com/pkg/errors"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4"
|
||||
version = "v0.8.1"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "5fa0fad44ae6516c3c699a60210634ddcc7d36e6b8a10bae25d0efcc001bb768"
|
||||
input-imports = [
|
||||
"github.com/golift/unifi",
|
||||
"github.com/influxdata/influxdb/client/v2",
|
||||
"github.com/naoina/toml",
|
||||
"github.com/ogier/pflag",
|
||||
]
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
||||
|
|
|
|||
20
Makefile
20
Makefile
|
|
@ -14,20 +14,34 @@ linux:
|
|||
|
||||
install: man test build
|
||||
@echo "If you get errors, you may need sudo."
|
||||
# Install binary.
|
||||
GOBIN=/usr/local/bin go install -ldflags "-w -s" ./...
|
||||
# Make folders and install man page.
|
||||
mkdir -p /usr/local/etc/unifi-poller /usr/local/share/man/man1
|
||||
mv *.1.gz /usr/local/share/man/man1
|
||||
# Install config file, man page and launch agent or systemd unit file.
|
||||
test -f /usr/local/etc/unifi-poller/up.conf || cp up.conf.example /usr/local/etc/unifi-poller/up.conf
|
||||
test -d ~/Library/LaunchAgents && cp startup/launchd/com.github.davidnewhall.unifi-poller.plist ~/Library/LaunchAgents || true
|
||||
test -d /etc/systemd/system && cp startup/systemd/unifi-poller.service /etc/systemd/system || true
|
||||
mv *.1.gz /usr/local/share/man/man1
|
||||
# Make systemd happy by telling it to reload.
|
||||
test -x /bin/systemctl && /bin/systemctl --system daemon-reload
|
||||
@echo "Installation Complete. Edit the config file @ /usr/local/etc/unifi-poller/up.conf "
|
||||
@echo "Then start the daemon with:"
|
||||
@test -d ~/Library/LaunchAgents && echo " launchctl load ~/Library/LaunchAgents/com.github.davidnewhall.unifi-poller.plist"
|
||||
@test -d /etc/systemd/system && echo " sudo /bin/systemctl start unifi-poller"
|
||||
@echo "Examine the log file at: /usr/local/var/log/unifi-poller.log (logs may go elsewhere on linux, check syslog)"
|
||||
|
||||
uninstall:
|
||||
@echo "If you get errors, you may need sudo."
|
||||
test -f ~/Library/LaunchAgents/com.github.davidnewhall.unifi-poller.plist && launchctl unload ~/Library/LaunchAgents/com.github.davidnewhall.unifi-poller.plist || true
|
||||
test -f /etc/systemd/system/unifi-poller.service && systemctl stop unifi-poller || true
|
||||
# Stop the daemon
|
||||
test -x /bin/systemctl && /bin/systemctl stop unifi-poller
|
||||
test -x /bin/launchctl && /bin/launchctl unload ~/Library/LaunchAgents/com.github.davidnewhall.unifi-poller.plist
|
||||
# Delete config file, binary, man page, launch agent or unit file.
|
||||
rm -rf /usr/local/{etc,bin}/unifi-poller /usr/local/share/man/man1/unifi-poller.1.gz
|
||||
rm -f ~/Library/LaunchAgents/com.github.davidnewhall.unifi-poller.plist
|
||||
rm -f /etc/systemd/system/unifi-poller.service
|
||||
# Make systemd happy by telling it to reload.
|
||||
test -x /bin/systemctl && /bin/systemctl --system daemon-reload
|
||||
|
||||
test: lint
|
||||
for p in $(PACKAGES) $(LIBRARYS); do go test -race -covermode=atomic $${p}; done
|
||||
|
|
|
|||
Loading…
Reference in New Issue