系统环境: 64位
NAME=“openEuler”
VERSION=“22.03 (LTS-SP2)”
ID=“openEuler”
VERSION_ID=“22.03”
PRETTY_NAME=“openEuler 22.03 (LTS-SP2)”
ANSI_COLOR=“0;31”
使用欧拉操作系统设置开机自启动失败,通过两种方式都失败,
,操作:
1、在目录/etc/systemd/system 下建立a.service文件,内容如下:
[Unit]
Description=examinfo app
[Service]
Type=simple
ExecStart=/bin/bash /data/examupload/boot.sh start
Restart=on-failure
[Install]
WantedBy=multi-user.target
并且已经systemctl enable a.service设置开机启动,a.service文件也已经给了权限
2、在/etc/rc.d/rc.local文件加入启动命令
/data/examupload/bootstart.sh
然后给文件rc.local授权,chmod +x rc.local
重启系统没有生效,麻烦技术大佬给一个方案指导一下,万分感谢