debian6开机启动脚本的方法

༺小ʚɞ寞༻ Linux评论26,3461字数 1398阅读4分39秒阅读模式

在debian6中,加入开机启动脚本的方法与debian5不同了,直接做符号链接到runlevel已经不起作用了,提示缺少LSB信息,并且用insserv来替代update-rc.d:

  1. root@14:/etc/rc2.d# update-rc.d -n  php_fastcgi.sh  defaults
  2. update-rc.d: using dependency based boot sequencing
  3. insserv: warning: script 'K02php_fastcgi' missing LSB tags and overrides
  4. insserv: warning: script 'K01php_fastcgi.sh' missing LSB tags and overrides
  5. insserv: warning: script 'php_fastcgi.sh' missing LSB tags and overrides
  6. insserv: warning: current start runlevel(s) (emptyempty) of script `php_fastcgi.sh' overwrites defaults (2 3 4 5).
  7. insserv: warning: current stop runlevel(s) (0) of script `php_fastcgi.sh' overwrites defaults (0 1 6).
  8. insserv: dryrun, not creating .depend.boot, .depend.start, and .depend.stop
  9. # insserv /etc/init.d/php_fastcgi.sh
  10. insserv: warning: script 'K02php_fastcgi' missing LSB tags and overrides
  11. insserv: warning: script 'php_fastcgi.sh' missing LSB tags and overrides

debian6中将脚本加入到开机启动的方法:

在脚本中加入LSB描述信息。

  1. # more  /etc/init.d/php_fastcgi.sh
  2. #!/bin/sh
  3. ### BEGIN INIT INFO
  4. # Provides:          php_fastcgi.sh
  5. # Required-Start:    $local_fs $remote_fs $network $syslog
  6. # Required-Stop:     $local_fs $remote_fs $network $syslog
  7. # Default-Start:     2 3 4 5
  8. # Default-Stop:      0 1 6
  9. # Short-Description: starts the php_fastcgi daemon
  10. # Description:       starts php_fastcgi using start-stop-daemon
  11. ### END INIT INFO

安装启动脚本到system init script。

  1. insserv -v -d /etc/init.d/php_fastcgi.sh

重启机器试试吧。

历史上的今天
5月
18
weinxin
LuckTang's Blog 站长语录
LuckTang's Blog,欢迎各位来访!这是我的QQ,扫一扫,加好友。大家一起交流博客建站技术,分享前沿资讯!
Linux最后更新:2018-1-13
如何在Linux下禁用IPv6 Linux

如何在Linux下禁用IPv6

IPv6被认为是IPv4——互联网上的传统32位地址空间——的替代产品,它用来解决现有IPv4地址空间即将耗尽的问题。然而,由于已经有大量主机、设备用IPv4连接到了互联网上,所以想在一夜之间将它们全...
使用 Google BBR 拥塞算法加速 TCP Wiki

使用 Google BBR 拥塞算法加速 TCP

Google BBR是一个TCP加速优化工具,类似于锐速,可用于优化 TCP 连接。最近一下就火起来了,说明还是有牛逼的地方,咱也别落后,用起来。 GitHub 地址为:https://github....
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定