【トラブル】【Linux】insservコマンド実行時のエラー対処方法

エラー「insserv: script xxxx is not an executable ・・・」が表示する

エラー内容

insserv: script xxxx is not an executable regular file, skipped!

 xxx : 起動スクリプト

原因

 * 起動スクリプトに実行権を付けてない

対処方法

 * 実行権を付ける

chmod 755 /etc/init.d/xxxx

参考文献

https://hirooka.pro/?p=5175

エラー「insserv: service xxxx has to be enabled ・・・」が表示する

エラー内容

insserv: service xxxx has to be enabled to start service yyyy

 xxxx : 起動スクリプト名
 yyyy : デーモン名

原因

 * 起動スクリプトの「Required-Start」で指定したデーモン名のせい
(今回の場合、コピーしてもってきた起動スクリプトを修正したがコピー元で使用していたデーモンが不要のものだった)

例:起動スクリプト

{
#! /bin/sh
# Provides:          tomcat
# Required-Start:    yyyy
・・・略・・・

対処方法

 * 起動スクリプトの「Required-Start」で指定したデーモン名を削除

例:起動スクリプト

{
#! /bin/sh
# Provides:          tomcat
# Required-Start:    
・・・略・・・


関連記事

Tomcatをデーモン(daemon)として起動するには ~Debian編~

http://blogs.yahoo.co.jp/dk521123/34754575.html