Debian 10 服务未启动

Debian 10 服务未启动

大家好,

我想为 Debian 10 创建一个服务,但是当我尝试使用命令“运行它时sudo systemctl 启动 boot_time”,它没有开始。但如果我启动脚本本身,它就会启动。

我已经对这两个文件设置了 chmod 权限。

Boot_time.sh:

#!/bin/bash 

AppLauncher 

Boot_time.service:

[Unit] 

Description=Launch AppLauncher when distro is booting 



[Service] 

Type=simple 

ExecStart=/bin/bash /usr/bin/boot_time.sh 

Restart=on-failure 



[Install] 

WantedBy=multi-user.target 

这是我运行时的日志“sudo systemctl 启动 boot_time.service”:

● boot_time.service - Launch AppLauncher when distro is booting 
Loaded: loaded (/etc/systemd/system/boot_time.service; enabled; vendor preset: enabled) 
Active: failed (Result: exit-code) since Tue 2019-12-10 22:56:35 CET; 13s ago 
Process: 1513 ExecStart=/bin/bash /usr/bin/boot_time.sh (code=exited, status=134) 
Main PID: 1513 (code=exited, status=134)déc. 10 22:56:35 debian bash[1513]: /usr/bin/boot_time.sh : ligne 3 : 1514 Abandon AppLauncher 
déc. 10 22:56:35 debian systemd[1]: boot_time.service: Main process exited, code=exited, status=134/n/a 
déc. 10 22:56:35 debian systemd[1]: boot_time.service: Failed with result 'exit-code'. 
déc. 10 22:56:35 debian systemd[1]: boot_time.service: Service RestartSec=100ms expired, scheduling restart. 
déc. 10 22:56:35 debian systemd[1]: boot_time.service: Scheduled restart job, restart counter is at 5. 
déc. 10 22:56:35 debian systemd[1]: Stopped Launch AppLauncher when distro is booting. 
déc. 10 22:56:35 debian systemd[1]: boot_time.service: Start request repeated too quickly. 
déc. 10 22:56:35 debian systemd[1]: boot_time.service: Failed with result 'exit-code'. 
déc. 10 22:56:35 debian systemd[1]: Failed to start Launch AppLauncher when distro is booting. 

您对我面临的这个问题有什么想法吗?

先感谢您!

相关内容