Service Ubuntu 16.04服务器自定义服务

Service Ubuntu 16.04服务器自定义服务,service,daemon,ubuntu-16.04,ubuntu-server,Service,Daemon,Ubuntu 16.04,Ubuntu Server,在ubuntu 16.04中有一种创建自定义服务的方法吗? 我想要在启动时自动启动,可通过service mycustomservice start 服务应该启动一个php websocket:() 请与主管一起尝试 至少你能告诉我为什么投反对票吗?只是为了理解。我已经在谷歌上搜索过了,但什么都没有。尝试使用crontab php -f socket.php [program:ratchet] command = bash -c "ulimit -n 10000

在ubuntu 16.04中有一种创建自定义服务的方法吗? 我想要在启动时自动启动,可通过
service mycustomservice start

服务应该启动一个php websocket:()


请与
主管一起尝试


至少你能告诉我为什么投反对票吗?只是为了理解。我已经在谷歌上搜索过了,但什么都没有。尝试使用crontab
php -f socket.php
[program:ratchet]
command                 = bash -c "ulimit -n 10000; exec /usr/bin/php ./bin/tutorial-terminal-chat.php"
process_name            = Ratchet
numprocs                = 1
autostart               = true
autorestart             = true
user                    = root
stdout_logfile          = ./logs/info.log
stdout_logfile_maxbytes = 1MB
stderr_logfile          = ./logs/error.log
stderr_logfile_maxbytes = 1MB