Update tailscale_container_hook

- Add check if script runs as `root`
This commit is contained in:
Christoph
2024-12-06 07:32:30 +01:00
committed by GitHub
parent c324597be2
commit d687a6a404
+5
View File
@@ -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