debian rustdesk-server 开机自启动
- clone rustdesk-server-demo
https://github.com/rustdesk/rustdesk-server-demo.git
- 提前编译好
cargo build
- 写一个脚本
run_rustserver.sh
,内容如下:IP=192.168.50.77 /home/ling/code/rustdesk-server-demo/target/debug/rustdesk-server
- 在
/etc/systemd/system
下,创建一个rustdesk-server.service 文件,内容如下:1
2
3
4
5
6
7
8
9[Unit]
Description=Rust Server
[Service]
Type=simple
ExecStart=/bin/bash /home/ling/run_rustserver.sh
[Install]
WantedBy=multi-user.target chmod 0644 rustdesk-server.service
systemctl enable rustdesk-server.service
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!