From df46248a0cc80aec6cd16a5b6e3d80b61a374e55 Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Tue, 12 Apr 2022 23:56:16 -0700 Subject: [PATCH] silence catting files that don't exist in docker entrypoint Signed-off-by: Erik Hollensbe --- entrypoint.sh.release | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh.release b/entrypoint.sh.release index d8222305b..71d3a7cf2 100644 --- a/entrypoint.sh.release +++ b/entrypoint.sh.release @@ -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 }