启动网络服务后无法在 systemd 中启动 Activation.service

启动网络服务后无法在 systemd 中启动 Activation.service

我有一个文件Activation.service,我想在网络服务成功启动后在启动过程中执行。这是Activation.service文件:

[Unit]
Description=Starting activation service during boot
Wants=network-online.target
After=network-online.target

[Service]
Type=forking
ExecStart=/opt/Neurotec_Biometric_10_0_SDK/Bin/Linux_x86_64/Activation/run_pgd.sh
TimeoutSec=30
Restart=on-failure
RestartSec=10
StartLimitInterval=350
StartLimitBurst=10

[Install]
WantedBy=multi-user.target
Alias=Activation.service

run_pgd.sh脚本运行良好,我在加载之前已经测试过该脚本systemd

sudo systemctl start Activation.service抛出了错误。这是我从systemctl status Activation.service

● Activation.service - Starting activation service during boot
   Loaded: loaded (/etc/systemd/system/Activation.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2017-11-23 09:46:30 IST; 3s ago
  Process: 3015 ExecStart=/opt/Neurotec_Biometric_10_0_SDK/Bin/Linux_x86_64/Activation/run_pgd.sh (code=exited, status=1/FAILURE)

Nov 23 09:46:30 inch-desktop systemd[1]: Failed to start Starting activation service during boot.
Nov 23 09:46:30 inch-desktop systemd[1]: Activation.service: Unit entered failed state.
Nov 23 09:46:30 inch-desktop systemd[1]: Activation.service: Failed with result 'exit-code'.

我从journalctl -xe

-- Unit Activation.service has begun starting up.
Nov 23 09:53:57 inch-desktop run_pgd.sh[3158]: Usage: /opt/Neurotec_Biometric_10_0_SDK/Bin/Linux_x86_64/Activation/run_pgd.sh {start|stop|restart|log}
Nov 23 09:53:57 inch-desktop systemd[1]: Activation.service: Control process exited, code=exited status=1
Nov 23 09:53:57 inch-desktop systemd[1]: Failed to start Starting activation service during boot.
-- Subject: Unit Activation.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit Activation.service has failed.
-- 
-- The result is failed.
Nov 23 09:53:57 inch-desktop systemd[1]: Activation.service: Unit entered failed state.
Nov 23 09:53:57 inch-desktop systemd[1]: Activation.service: Failed with result 'exit-code'.
Nov 23 09:53:57 inch-desktop sudo[3155]: pam_unix(sudo:session): session closed for user root

我不确定哪里出了问题。我需要做什么吗

相关内容