#!/bin/sh DAEMON="tailscaled" PIDFILE="/var/run/$DAEMON.pid" # Set the port to listen on for incoming VPN packets. # Remote nodes will automatically be informed about the new port number, # but you might want to configure this in order to set external firewall # settings. PORT="41641" # Extra flags you might want to pass to tailscaled. FLAGS="" # You need tailscaled at /usr/sbin to server, and tailscale at /usr/bin to operate # STATIC version needed. Download page at https://pkgs.tailscale.com/stable/#static PKG_URL_LATEST="https://pkgs.tailscale.com/stable/tailscale_latest_riscv64.tgz" [ ! -x /usr/sbin/$DAEMON ] && echo "/usr/sbin/$DAEMON not found, please download it from $PKG_URL_LATEST" && echo "Then unpack it, copy $DAEMON to /usr/sbin and copy tailscale to /usr/bin" && exit 1 VERSION=$(/usr/sbin/$DAEMON --version|sed -n '1p'|xargs echo -n) [ -x /usr/bin/tailscale ] || echo "/usr/bin/tailscale not found, your installation of tailscale may be broken" # just for those need forwarding [ ! -f /etc/sysctl.d/99-tailscale.conf ] && mkdir -p /etc/sysctl.d/ && echo "missing /etc/sysctl.d/99-tailscale.conf, try make it below:" && (tee /etc/sysctl.d/99-tailscale.conf </dev/null [ $? = 0 ] && echo "OK" || echo "FAIL" ;; restart|reload) $0 stop $0 start ;; doc) cat <