项目重构
This commit is contained in:
27
0-部署应用/Oracle-Cloud/tailscale全互联/derper-new-tc-hk.sh
Normal file
27
0-部署应用/Oracle-Cloud/tailscale全互联/derper-new-tc-hk.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
# 参考 https://www.boris1993.com/self-hosting-tailscale-derp.html
|
||||
|
||||
|
||||
# /etc/systemd/system/derper-server.service
|
||||
|
||||
[Unit]
|
||||
# 服务名字
|
||||
Description=Tailscale DERP Server
|
||||
# 在网络服务启动后启动这个服务
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
# 改成你的用户名
|
||||
User=root
|
||||
# 总是自动重新启动
|
||||
Restart=always
|
||||
# 重启前等待5秒
|
||||
RestartSec=5
|
||||
# 启动derper的命令,跟上面测试用的命令一样
|
||||
ExecStart=/root/go/bin/derper -c=/root/app-install/derper/derper.conf -hostname derper.107421.xyz -a :21443 -certmode manual -certdir /root/app-install/derper/
|
||||
# 停止derper的命令
|
||||
ExecStop=/bin/kill $MAINPID
|
||||
# 赋予CAP_NET_BIND_SERVICE这个capability
|
||||
#AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user