【发布时间】:2017-03-24 11:07:52
【问题描述】:
我有一个新贵服务,只需将我的 conf 存储在/etc/init/test.conf,它就可以正常工作。现在我已经升级到 Xenial 16.04.2 LTS,我遇到了找不到服务的问题。
现在需要 systemd 脚本吗?如果您仍然可以仅使用 conf 文件来获得新贵,我该怎么做才能解决这个问题?
下面是一个示例 from digital ocean,它演示了这个问题:
ubuntu@vagrant:~$ sudo ls -la /etc/init/test.conf
-rw-r--r-- 1 root root 126 Mar 24 10:54 /etc/init/test.conf
ubuntu@vagrant:~$ sudo cat /etc/init/test.conf
description "Job that runs the foo daemon"
start on runlevel [2345]
exec echo Test Job ran at `date` >> /var/log/testjob.log
ubuntu@vagrant:~$ sudo service test status
● test.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
ubuntu@vagrant:~$ sudo service test start
Failed to start test.service: Unit test.service not found.
【问题讨论】:
-
不解释就投反对票?
标签: linux ubuntu ubuntu-14.04 ubuntu-16.04 upstart