Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update autostart_systemd.rst #6296

Closed
wants to merge 1 commit into from

Conversation

pablo8itall
Copy link

When creating the name of the of the systemd file you need to add the instance name after the @ symbol, e.g. [email protected], as the service file uses the %I for this information.

Description of the changes

added some text explaining that the instance name needs to be used when naming the file.

Have the changes in this PR been tested?

Yes

When creating the name of the of the systemd file you need to add the instance name after the @ symbol, e.g. [email protected], as the service file uses the %I for this information.
@github-actions github-actions bot added Category: Docs - Install Guides This is related to install guides. Docs-only labels Feb 22, 2024
@yamikaitou
Copy link
Contributor

This is actually incorrect. The file needs to be saved as we had it but when you interact with the service, you include the instancename.

@palmtree5
Copy link
Member

As stated by @yamikaitou, this is incorrect. What we're doing here is creating a template file that one can then instantiate multiple units off of. To quote from the documentation for systemd.unit

As mentioned above, a unit may be instantiated from a template file. This allows creation of multiple units from a single configuration file. If systemd looks for a unit configuration file, it will first search for the literal unit name in the file system. If that yields no success and the unit name contains an "@" character, systemd will look for a unit template that shares the same name but with the instance string (i.e. the part between the "@" character and the suffix) removed.

So with that, when you attempt to start instancename using systemctl start red@instancename, it is going to find our unit template [email protected] and instantiate a service named red@instancename from it.

I am closing this PR as there is no need to change the current instructions on this

@palmtree5 palmtree5 closed this Feb 22, 2024
@palmtree5 palmtree5 added Closed: Invalid There is no action to be taken in response to this issue. Closed: Won't Fix It's supposed to be this way or we're not interested in fixing this. There's probably a good reason. labels Feb 22, 2024
@pablo8itall pablo8itall deleted the patch-1 branch April 1, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Docs - Install Guides This is related to install guides. Closed: Invalid There is no action to be taken in response to this issue. Closed: Won't Fix It's supposed to be this way or we're not interested in fixing this. There's probably a good reason. Docs-only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants