insserv: warning: script 'lampp' missing LSB tags and overrides
https://ubuntuforums.org/showthread.php?t=2327011
1、方法一,编辑rc.loacl脚本
Ubuntu开机之后会执行/etc/rc.local文件中的脚本,
所以我们可以直接在/etc/rc.local中添加启动脚本。
当然要添加到语句:exit 0 前面才行。
如:
代码如下:
然后在 exit 0 前面添加好脚本代码。
2、方法二,添加一个Ubuntu的开机启动服务。
如果要添加为开机启动执行的脚本文件,
可先将脚本复制或者软连接到/etc/init.d/目录下,
然后用:update-rc.d xxx defaults NN命令(NN为启动顺序),
将脚本添加到初始化执行的队列中去。
注意如果脚本需要用到网络,则NN需设置一个比较大的数字,如99。
1) 将你的启动脚本复制到 /etc/init.d目录下
以下假设你的脚本文件名为 test。
2) 设置脚本文件的权限
代码如下:
3) 执行如下命令将脚本放到启动脚本中去:
代码如下:
$ sudo update-rc.d test defaults 95
注:其中数字95是脚本启动的顺序号,按照自己的需要相应修改即可。在你有多个启动脚本,而它们之间又有先后启动的依赖关系时你就知道这个数字的具体作用了。该命令的输出信息参考如下:
代码如下:
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Adding system startup for /etc/init.d/test ...
/etc/rc0.d/K95test -> ../init.d/test
/etc/rc1.d/K95test -> ../init.d/test
/etc/rc6.d/K95test -> ../init.d/test
/etc/rc2.d/S95test -> ../init.d/test
/etc/rc3.d/S95test -> ../init.d/test
/etc/rc4.d/S95test -> ../init.d/test
/etc/rc5.d/S95test -> ../init.d/test
卸载启动脚本的方法:
代码如下:
$ sudo update-rc.d -f test remove
命令输出的信息参考如下:
代码如下:
/etc/rc0.d/K95test
/etc/rc1.d/K95test
/etc/rc2.d/S95test
/etc/rc3.d/S95test
/etc/rc4.d/S95test
/etc/rc5.d/S95test
/etc/rc6.d/K95test
-------------------------------------------------------------------------------------------------
Re: insserv: warning: script 'lampp' missing LSB tags and overrides
Originally Posted by sreez
Iam using ubuntu 16.04 server while adding lampp service to automatic startup on the boot sudo update-rc.d lampp defaults. Its shows the error insserv: warning: script 'lampp' missing LSB tags and overrides insserv: There is a loop between service monit and lampp if stopped insserv: loop involving service lampp at depth 2 insserv: loop involving service monit at depth 1 insserv: Stopping lampp depends on monit and therefore on system facility `$all' which can not be true! insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header plz help to fix it. thanks in advance.have same issue and fix this with edit lampp script
Code:#!/bin/bash
### BEGIN INIT INFO
# Provides: lampp
# Required-Start: $local_fs $syslog $remote_fs dbus
# Required-Stop: $local_fs $syslog $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start lampp
### END INIT INFO
/opt/lampp/lampp start
insserv: warning: script 'lampp' missing LSB tags and overrides的更多相关文章
- insserv: warning: script 'busybox-httpd' missing LSB tags and overrides
/********************************************************************************* * insserv: warnin ...
- Ubuntu做Tomcat服务:insserv: warning: script 'tomcat' missing LSB tags and overrides
https://blog.csdn.net/hanchao5272/article/details/79819460 转载自:https://blog.bbzhh.com/index.php/arch ...
- 解决chkconfig设置开机启动时出现missing LSB的错误
0x00 主要原因是脚本不符合LSB tags规范,在#!/bin/bash下面添加如下代码即可 以tomcat为例 ### BEGIN INIT INFO # Provides: bbzhh.com ...
- Obj-C, library with ARC code and warning - Method possibly missing a [super dealloc] call?
1 down vote favorite I'm adding the MKStoreKit to my app and I'm getting a warning, Method possibly ...
- warning:Pointer is missing a nullability type specifier (__nonnull or __nullable)
当我们定义某个属性的时候 如果当前使用的编译器版本比较高(6.3+)的话经常会遇到这样一个警告:warning:Pointer is missing a nullability type speci ...
- 解决ubuntu的chkconfig[/sbin/insserv 无法找到路径问题]
http://www.cnblogs.com/lost-1987/archive/2012/10/17/2727285.html 今天在虚拟机里做DRBD实验,使用chkconfig管理服务的时候,出 ...
- redis-在乌班图下设置自动启动
一.修改redis.conf 1.打开后台运行选项,默认情况下,Redis不在后台运行: daemonize yes 2.配置log文件地址,默认使用标准输入,即打印在命令行终端 的窗口上 logfi ...
- supervisor 从安装到使用
(转)https://www.jianshu.com/p/3658c963d28b 一.安装 源码安装 先下载最新的supervisor安装包:https://pypi.python.org/pypi ...
- ubuntu16 下安装redis 以及设置其为开机启动
1.下载redis安装包 sudo wget http://download.redis.io/releases/redis-3.2.6.tar.gz 2.解压 tar -zxvf redis-3. ...
随机推荐
- input动态模糊查询的实现方式
最近在用jQuery实现动态模糊查询的时候,找了挺久都没有找到像Vue.js的watch属性这么好用的动态模糊查询方法.就分享一下目前遇到的坑和可以实现动态查询的几种方式. 1.jQuery的chan ...
- perl的bareword
perl的bareword可能被认为:label . 句柄 .函数 . 普通字符串. 上下文不同,解释器有歧义. 最好用 use strict; use warning;
- LIN总线协议
汽车电子类的IC有的采用LIN协议来烧录内部NVM,如英飞凌的TLE8880N和博世的CR665D. LIN总线帧格式如下,一个LIN信息帧有同步间隔.同步域.标示符域(PID域).数据域.校验码域. ...
- linux文本界面../和./的区别
linux文本界面../和./的区别 ../代表的是上一个目录 ./代表的当前目录
- ubuntu介绍以及使用
Ubuntu(友帮拓.优般图.乌班图)是一个以桌面应用为主的开源GNU/Linux操作系统,Ubuntu 是基于Debian GNU/Linux,支持x86.amd64(即x64)和ppc架构,由全球 ...
- python接口自动化测试二十七:密码MD5加密
# MD5加密 # 由于MD5模块在python3中被移除# 在python3中使用hashlib模块进行md5操作import hashlib def MD5(str): # 创建md5对象 hl ...
- [jenkins学习篇] 安装jenkins
1 下载war包,https://jenkins.io/download/ 2 安装jar包,java -jar jenkins.war 3 打开网址:http://localhost:8080 4 ...
- LINQ-查询表达式基础
一.LINQ查询的数据源 从应用程序的角度来看,原始源数据的特定类型和结构并不重要. 应用程序始终将源数据视为 IEnumerable<T> 或 IQueryable<T> 集 ...
- 使用Unity做2.5D游戏教程(二)
最近在研究Unity 3D,看了老外Marin Todorov写的教程很详细,就翻译过来以便自己参考,翻译不好的地方请多包涵. 这是使用Unity 游戏开发工具制作一个简单的2.5D 游戏系列教程的第 ...
- VS的一些错误解决方法记录
1.errorC2664 "bool CMarkup::AddElem(MCD_CSTR,MCD_CSTR,int)":不能将参数1从“constchar [7]” 转换位&quo ...
