From 4a28125ee24368733ab7b3fbd664fb5c9846b887 Mon Sep 17 00:00:00 2001 From: sceox Date: Mon, 27 Dec 2021 15:24:39 -0800 Subject: [PATCH] automatically set tail -F or -f by checking uname --- q2a_usercheck.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/q2a_usercheck.sh b/q2a_usercheck.sh index 031f6ad..6048be4 100755 --- a/q2a_usercheck.sh +++ b/q2a_usercheck.sh @@ -2,7 +2,11 @@ logf='/var/log/nginx/access.log' cache='/tmp/forumspam_cache' -tail_opts='-F' # set to `-f` on OpenBSD! + +case `uname` in + (*"BSD"*) tail_opts='-f';; + (*) tail_opts='-F';; +esac test -f $cache || install -m 600 /dev/null $cache