配置流程(RPM 系约定路径 /etc/rc.d/rc.local)
配置流程(RPM 系约定路径 /etc/rc.d/rc.local)
cat > /etc/rc.d/rc.local <<'EOF'
#!/bin/bash
/opt/scripts/start-batch.sh >> /var/log/rc-local.log 2>&1
EOF
chmod +x /etc/rc.d/rc.local
systemctl enable --now rc-local.service
systemctl status rc-local --no-pagerrc.local 同步执行、无重试与日志规范:关键业务写正式 unit(Restart/After 可控),rc.local 留给一次性环境准备。