| #!/bin/bash |
|
|
| |
| echo "$USERNAME:${RDP_PASSWORD:-defaultpassword}" | chpasswd |
|
|
| |
| mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale |
|
|
| |
| echo "Starting Tailscale daemon..." |
| tailscaled --tun=userspace-networking --state=/var/lib/tailscale/tailscaled.state & |
| sleep 5 |
|
|
| |
| if [ -n "$TAILSCALE_AUTHKEY" ]; then |
| echo "Authenticating to Tailscale..." |
| tailscale up --authkey=${TAILSCALE_AUTHKEY} --hostname=hf-centos-desktop |
| else |
| echo "Error: TAILSCALE_AUTHKEY is not set in Hugging Face Secrets." |
| fi |
|
|
| |
| xrdp-keygen xrdp auto |
| /usr/sbin/xrdp-sesman |
| /usr/sbin/xrdp |
|
|
| |
| echo "Starting dummy server for HF Spaces health check on port 7860..." |
| python3 -m http.server 7860 |