赞
踩
https://blog.csdn.net/qq_48974566/article/details/137212295
sudo vim /lib/systemd/system/rc-local.service
# SPDX-License-Identifier: LGPL-2.1+ # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # This unit gets pulled automatically into multi-user.target by # systemd-rc-local-generator if /etc/rc.local is executable. [Unit] Description=/etc/rc.local Compatibility Documentation=man:systemd-rc-local-generator(8) ConditionFileIsExecutable=/etc/rc.local After=network.target [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 RemainAfterExit=yes GuessMainPID=no [Install] WantedBy=multi-user.target
#!/bin/sh
bash /home/robot/multi-lidar-perception/perception_start.sh 2>&1 >>/home/robot/test/test1.log &
return 0
systemctl start rc-local.service
systemctl restart rc-local
systemctl stop rc-local.service
systemctl enable rc-local.service
systemctl disable rc-local.service
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。