chkconfigは私のスクリプトをサポートしていません

chkconfigは私のスクリプトをサポートしていません

私はずっと見ましたが、役に立つ手がかりが見つかりませんでした。必要に応じて少し変更するTomcat起動スクリプトがあります。 Centos/redhat 6 システムでは正常に動作しますが、centos/redhat 5 システムでは機能しません。

出力は次のとおりですchkconfig --add tomcat

$ chkconfig --add tomcat
service tomcat does not support chkconfig

これはTomcatスクリプトの上部です。

#!/bin/bash
#
# Tomcat 8 start/stop/status init.d script
# Initially forked from: https://gist.github.com/valotas/1000094
# @author: Miglen Evlogiev <[email protected]>
#
# Release updates:
# Updated method for gathering pid of the current proccess
# Added usage of CATALINA_BASE
# Added coloring and additional status
# Added check for existence of the tomcat user
# Added termination proccess
#chkconfig: 2345 20 80
#discription Tomcat Starup Script 
#Location of JAVA_HOME (bin files)

ベストアンサー1

「説明」を「説明:」(スペルミスやコロンがない)に置き換えます。

RHEL 5には「chkconfig:」と「説明:」が必要で、RHEL6には「chkconfig:」のみが必要です。

おすすめ記事