我有一份简单的新贵工作:- /etc/init/hmastart.conf
我想测试它,所以我运行:-
service hmastart start
但我收到以下错误:-
start: Unknown job: hmastart
如果我尝试,我会收到相同的错误消息:
start hmastart
我也试过在开头添加 sudo,但我得到了同样的错误。
这是我的脚本
description "Starts HMA VPN"
author "Me <myself@i.com>"
start on runlevel [2345]
stop on runlevel [016]
respawn
expect fork
exec sudo /usr/local/bin/hma-vpn -p tcp London
Run Code Online (Sandbox Code Playgroud)
我的 conf 文件与 /etc/init.d 中的所有其他 conf 文件具有相同的权限。
有人能告诉我为什么找不到/运行这个脚本吗?
非常感谢提前!`
upstart ×1