Merge pull request #1624 from erikh/silence-entrypoint-errors

silence catting files that don't exist in docker entrypoint
This commit is contained in:
Erik Hollensbe 2022-04-12 23:58:00 -07:00 committed by GitHub
commit cade483a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
#!/bin/sh
grepzt() {
[ -f /var/lib/zerotier-one/zerotier-one.pid -a -n "$(cat /var/lib/zerotier-one/zerotier-one.pid)" -a -d "/proc/$(cat /var/lib/zerotier-one/zerotier-one.pid)" ]
[ -f /var/lib/zerotier-one/zerotier-one.pid -a -n "$(cat /var/lib/zerotier-one/zerotier-one.pid 2>/dev/null)" -a -d "/proc/$(cat /var/lib/zerotier-one/zerotier-one.pid 2>/dev/null)" ]
return $?
}
@ -34,7 +34,7 @@ mkztfile zerotier-one.port 0600 "9993"
killzerotier() {
echo "Killing zerotier"
kill $(cat /var/lib/zerotier-one/zerotier-one.pid)
kill $(cat /var/lib/zerotier-one/zerotier-one.pid 2>/dev/null)
exit 0
}