用systemctl无法启用服务

问题描述 投票:0回答:1

我做了这个服务。

#!/bin/bash
node ../../home/NodeServer/server.js

所有它应该做的是启动服务器的启动, 所以我想做的是:

sudo systemctl enable startServer.service

但我得到了这个错误。

startServer.sh.service is not a native service, redirecting to systemd-sysv-insall.
Executing: /lib/systemd/systemd-sysv-install enable startServer.sh
update-rc.d: error: startServer.sh Default-Start contains no runlevels, aborting.

当我尝试做

sudo systemctl start startServer.service

它的工作原理和预期一样。

raspberry-pi raspberry-pi3
1个回答
0
投票

我有同样的问题。我解决它再次键入的文件,因为它似乎有一个奇怪的字符,被打破的解析器。希望这能帮助你

© www.soinside.com 2019 - 2024. All rights reserved.