RedHat Linux 自动启动脚本设置 - Go语言中文社区

RedHat Linux 自动启动脚本设置


Note:working with user root.


1. 创建自启动脚本test.sh,一般放置到/etc/init.d/目录(optional)

#!bin/sh

xxxxxxxxxxxxxxx

2. 确定系统的启动level.

cat /etc/inittab

See the output line “id:?:initdefaut”, the value of the ? is the value for your system


3.链接启动脚本到启动序列目录

cd /etc/rc.d/rc?.d/
ln -s ../init.d/test.sh S##test

Where ## must be replaced by a number that is notcurrently in use by another symbolic link in the folder

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/hhcjb/article/details/9307897
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2023-01-03 19:15:10
  • 阅读 ( 263 )
  • 分类:Linux

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢