【linux】debian配置开机运行脚本

#创建脚本run.sh

touch /etc/init.d/run.sh

#配置脚本权限

chmod 777 /etc/init.d/run.sh

#写入运行的内容

vim /etc/init.d/run.sh
ethtool -K eth0 tso off
nohup /root/net-speeder-master/net_speeder eth0 "tcp" &
nohup /root/net-speeder-master/net_speeder eth0 "icmp" &
exit 0

#配置开机运行

update-rc.d run.sh start 6

#删除开机运行脚本

update-rc.d -f run.sh remove
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章