#!/bin/sh
# This script is set to be on PATH for tailscaled (in /etc/init.d/tailscale),
# so the tailscaled process can run as an unprivileged and use the resolvconf
# command to update /etc/resolv.conf.

if [ "$(id -u)" -ne 0 ]; then
	exec doas -n -u root /usr/sbin/resolvconf "$@"
else
	exec /usr/sbin/resolvconf "$@"
fi
