本文共 826 字,大约阅读时间需要 2 分钟。
/etc/rc.d/rc.local
#!/bin/bash# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES## It is highly advisable to create own systemd services or udev rules# to run scripts during boot instead of using this file.## In contrast to previous versions due to parallel execution during boot# this script will NOT be run after all other services.## Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure# that this script will be executed during boot.touch /var/lock/subsys/localrmmod ixgbemodprobe ixgbe allow_unsupported_sfp=1service network restartcd /opt/dpdk-16.11/tools./bind.sh#开机启动at now+1 minutes < /root/mybash.sh &
/root/mybash.sh
#!/bin/bashexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/some/pathecho Start OM `date` >> /root/mybash.startcd /my/execution/path(nohup /my/execution/path/exe 1>/root/mybash.log 2>&1 &)cd -
转载地址:http://scpaf.baihongyu.com/