|
Because the small chickens were not good at pulling mirrors, we directly started the rustdesk service in script form.
This is the script, chmod +x to give it permission:
[ol]#!/bin/sh workdir=$(dirname "$0") cd $workdirnohup $workdir/hbbs -k _ >> $workdir/nohup.out 2>&1 &nohup $workdir/hbbr -k _ >> $workdir/nohup.out 2>&1 & exit 0[/ol]
复制代码
Then add startup, in etc/systemd/system/rustdesk-autostart.service
[ol][Unit]Description=rustdesk-autostart ServerAfter=network-online.target [Service]Type=simpleExecStart=/root/rustdesk/rustdesk-start.shRemainAfterExit=yes [Install]WantedBy=multi-user.target[/ol]
复制代码
Then set boot up and start
[ol]systemctl enable rustdesk-autostart.servicesystemctl daemon-reloadsystemctl start rustdesk-autostart.service[/ol]
复制代码
But every week or so, ps -ef | grep hbb will not see the process, and rebooting is required for normal operation.
|
|