Bash 为什么chkconfig可以';你不能添加我的脚本吗?

Bash 为什么chkconfig可以';你不能添加我的脚本吗?,bash,shell,centos,init.d,conan,Bash,Shell,Centos,Init.d,Conan,嘿 我想在init.d中添加脚本,该脚本在启动时启动服务器,但无法将其添加到chkconfig中 这是我的剧本的一部分: #!/bin/bash # chkconfig : 2345 19 18 # Default-Start : 2 3 4 5 # Default-Stop : 0 1 6 # Short-description: Conan C/C++ Package Manager server # description : Conan C/C++ Pac

我想在init.d中添加脚本,该脚本在启动时启动服务器,但无法将其添加到chkconfig中

这是我的剧本的一部分:

#!/bin/bash
# chkconfig :       2345 19 18
# Default-Start :   2 3 4 5
# Default-Stop :    0 1 6
# Short-description: Conan C/C++ Package Manager server
# description :      Conan C/C++ Package Manager server
# processname: conan_server

# Source function library.
. /etc/init.d/functions
当我尝试添加它时:

[root init.d]# chmod 777 conan_server
[root init.d]# chkconfig --add conan_server
-> service conan_server does not support chkconfig

你能帮我吗?谢谢:)

conan_服务器不是一个服务,它只是一个普通的应用程序,我对chkconfig知之甚少,但我要说的是,服务必须符合特定的接口,并具有start()、stop()等命令。我认为您可能需要编写一个脚本来包装conan_服务器的发布。从…起请检查推荐的在生产中使用服务器的方法是否与gunicorn一起使用是的,我知道,但gunicorn是一种服务,我在脚本中使用gunicorn来启动conan服务器。你明白我想说什么吗?可能重复我在提问之前检查过的No,然后无论如何,请分享你脚本的其余部分。conan_服务器不是一个服务,它只是一个普通的应用程序,我对chkconfig知之甚少,但我要说的是,服务必须符合特定的接口,并具有start()、stop()等命令。我认为您可能需要编写一个脚本来包装conan_服务器的发布。从…起请检查推荐的在生产中使用服务器的方法是否与gunicorn一起使用是的,我知道,但gunicorn是一种服务,我在脚本中使用gunicorn来启动conan服务器。你明白我想说什么吗?可能重复我在提问前检查过的“否”。那么,无论如何,请分享你的脚本的其余部分。