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
And here the target code:
###########################################################################
# 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?
Enabling and Disabling Services To tell systemd to start services automatically at boot, you must enable them. To start a service at boot, use the enable command: sudo systemctl enable application . service.
The database server requires a Services file, which contains information about the known services on your network. The Services file is typically located in %windir%\System32\drivers\etc\services.
If you have installed your Red Hat Enterprise Linux using the graphical user interface (GUI), you can use systemctl to change to the regular console. To see your current default, run systemctl get-default. To change back to the command-line interface, execute systemctl set-default multi-user.
To boot under systemd, select the boot menu entry that you created for the purpose. If you didn't bother to create one, just select the entry for your patched kernel, edit the kernel command line directly in grub and add init=/lib/systemd/systemd. systemd.
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 will create symlink in /etc/systemd/system/xxx.target.wants, if your /etc/systemd/system/xxx.target.wants/xxx.service is not a symlink, systemd can not create symlink, it will throw this error.
please clean your /etc/systemd/system/xxx.target.wants/ dir.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With