如何解决在 ubuntu 20.04 中启动时的自定义脚本失败
我正在尝试使用以下方法在 custom shell script
上启动时运行 daemon file
和 Ubuntu-20.04-LTS
。
$ sudo nano /etc/systemd/system/custom-startup.service
[Unit]
Description=Custom Startup
[Service]
ExecStart=/home/test/Folder-1/tools/project/custom.sh
ExecStart=/home/test/Folder-1/tools/project/daemon-linux
[Install]
WantedBy=multi-user.target
$ sudo systemctl daemon-reload
$ sudo systemctl enable custom-startup.service
$ sudo systemctl start custom-startup.service
Failed to start custom-startup.service: Unit custom-startup.service has a bad unit file setting.
See system logs and 'systemctl status custom-startup.service' for details.
$ sudo systemctl status custom-startup.service
● custom-startup.service - Custom Startup
Loaded: bad-setting (Reason: Unit custom-startup.service has a bad unit file setting.)
Active: inactive (dead)
Jan 13 13:17:59 Marketing systemd[1]: custom-startup.service: Service has more than one ExecStart= setting,which is only allo>
Jan 13 13:30:55 Marketing systemd[1]: custom-startup.service: Service has more than one ExecStart= setting,which is only allo>
Jan 13 13:32:28 Marketing systemd[1]: custom-startup.service: Service has more than one ExecStart= setting,which is only allo>
Jan 13 13:36:29 Marketing systemd[1]: custom-startup.service: Service has more than one ExecStart= setting,which is only allo>
我不能运行多个 ExecStart
?即使使用单个 ExecStart
它也不起作用。任何纠正配置的指针都会有所帮助。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。