尝试在systemd中启用/启动自定义目标时出现问题 [英] Problems trying to enable/start custom target in systemd

查看:176
本文介绍了尝试在systemd中启用/启动自定义目标时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个目标文件来将我的所有个人服务分组到我的fedora 18中,我测试了这些服务,然后可以单独启动,但是如果我尝试启用该目标,则会收到错误消息!

i create a target file to group all my personal services in my fedora 18, i tested the services and i can start then individually, but if i try to enable the target i got a error message!

[root@ghostrider system]# systemctl enable developer.target
Failed to issue method call: Invalid argument

这里是目标代码:

###########################################################################
# Target para ativar servicos de desenvolvimento em Java
###########################################################################
#/etc/systemd/system/developer.target

[Unit]
Description=Processes Java
After=default.target

[Install]
Alias=developer.target

我真的不明白该消息的含义,有任何线索吗?

I really don't understand what that message means, any clues?

推荐答案

您有一个别名与单位(developer.target)相同的别名.这在编写服务文件时对我造成了同样的问题.这是完全多余的,因此只需将其删除.

You have an Alias with the same name as the unit (developer.target). This caused the same issue for me while writing a service file. It is completely redundant, so just remove it.

这篇关于尝试在systemd中启用/启动自定义目标时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆