从Debian 8迁移至Yocto后Systemd Service无法加载的问题求助
从Debian 8迁移至Yocto后Systemd Service无法加载的问题求助
各位好,我碰到了一个棘手的问题想请教大家:
之前在Debian机器上,我有个app.service,把它软链接到/etc/systemd/system/multi-user.target.wants目录后,服务运行完全正常,能自动启动我的应用。
最近我切换到Yocto构建系统,同样把这个service文件的软链接放到了同一个目录,但systemd似乎根本没“加载”这个服务。我用systemctl list-unit-files命令查找时,完全看不到我的服务;执行systemctl status app还会报错:Unit app.serivce could not be found.
奇怪的是,Yocto预加载到multi-user.target.wants里的其他服务都运行得好好的,唯独我的这个不行。
下面是我的app.service文件内容:
[Unit] Description=Main App Runner Requires=network.target After=network.target [Service] Type=simple ExecStart=/home/tyleax/mainapp ExecStop=/home/tyleax/led-control red WatchdogSec=60 Restart=always [Install] WantedBy=multi-user.target
有没有大佬清楚,为什么同样的文件、权限、软链接方式,在Yocto里就无法加载这个服务呢?
备注:内容来源于stack exchange,提问作者tyleax
相关产品推荐
相关产品推荐

