~txtsd/unbound-cache

ebd1fb0da9222689367d78c7534a5b65e19e9e32 — txtsd 1 year, 8 months ago 44012bf
fix: Actually allow running as root or unbound

Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M unbound-cache.sh
M unbound-cache.sh => unbound-cache.sh +1 -1
@@ 22,7 22,7 @@ usage ()
root_check ()
{
  # shellcheck disable=SC2046
  if [ ! $(id | cut -f2 -d"(" | cut -f1 -d")") = "root" ] || [ ! $(id | cut -f2 -d"(" | cut -f1 -d")") = "unbound" ]; then
  if [ ! $(id | cut -f2 -d"(" | cut -f1 -d")") = "root" ] && [ ! $(id | cut -f2 -d"(" | cut -f1 -d")") = "unbound" ]; then
    echo "ERROR: You must be root (or unbound) to run this script"
    exit 1
  fi