From d687a6a4046a85734f233245f12b6135e2e01773 Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 6 Dec 2024 07:32:30 +0100 Subject: [PATCH] Update tailscale_container_hook - Add check if script runs as `root` --- share/docker/tailscale_container_hook | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/docker/tailscale_container_hook b/share/docker/tailscale_container_hook index 738b7b2b8..d93b662b7 100755 --- a/share/docker/tailscale_container_hook +++ b/share/docker/tailscale_container_hook @@ -29,6 +29,11 @@ echo echo "Executing Unraid Docker Hook for Tailscale" echo +if [ "$(id -u)" != "0" ]; then + echo "ERROR: No root privileges!" + error_handler +fi + if [ ! -f /usr/bin/tailscale ] || [ ! -f /usr/bin/tailscaled ]; then if [ ! -z "${TAILSCALE_EXIT_NODE_IP}" ]; then if [ ! -c /dev/net/tun ]; then