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. ...
随机推荐
- python--触发器, 储存过程, 事务
一. 触发器 使用触发器可以定制用户对某一张表的数据进行 [增, 删 ,改] 操作时前后的行为, (注意 没有查询),在进行增删改的时候出发的某个动作叫做 触发器. 其实就是在增删改的时候另外执行了 ...
- Python9-装饰器进阶-day12
wapers方法 def wahaha(): ''' sljfldsjflds :return: ''' print('娃哈哈') print(wahaha.__name__) #查看字符串格式的函数 ...
- Linux中断底半部机制
参考: Linux下半部处理之软中断 linux中断底半部机制 <深入理解Linux内核>软中断/tasklet/工作队列 软中断和tasklet介绍 详解操作系统中断 Linux内核:中 ...
- WIN10配置instantclient
在PLSQL Developer目录下建立如下bat文件,替换其快捷方式,启动PLSQL Developer: @echo off set path=C:\instantclient-basic-nt ...
- PAT Basic 1010
1010 一元多项式求导 设计函数求一元多项式的导数.(注:x^n^(n为整数)的一阶导数为n*x^n-1^.) 输入格式:以指数递降方式输入多项式非零项系数和指数(绝对值均为不超过1000的整数). ...
- Python 轻量化简繁转换
最近项目中用到了简单的简繁转换,如果用OpenCC太重了,于是搜到了 zhconv 这个库. zhconv 提供基于 MediaWiki 词汇表的最大正向匹配简繁转换,Python 2, 3 通用. ...
- jq:mouseover和mouseout多次触发解决办法
区别: mouseover与mouseenter 不论鼠标指针穿过被选元素或其子元素,都会触发 mouseover 事件. 只有在鼠标指针穿过被选元素时,才会触发 mouseenter 事件. mou ...
- cf950d A Leapfrog in the Array
考虑在位置 \(p\) 的青蛙. 如果 \(p\) 是奇数,答案显然是 \((p+1)/2\). 否则,由于未跳时 \(p\) 左边有 \(p/2\) 只,则 \(p\) 右边有 \(n-p/2\) ...
- hdu2087
#include <stdio.h> #include <string.h> int main(){ int cnt,i,j,k; +],tmp[+]; int strl,tm ...
- 转自kuangbin的AC自动机(赛前最后一博)
有了KMP和Trie的基础,就可以学习神奇的AC自动机了.AC自动机其实就是在Trie树上实现KMP,可以完成多模式串的匹配. AC自动机 其实 就是创建了一个状态的转移图,思想很 ...