Score:0

Is there a way to update a SystemD configuration so that it will not start if its name equals "golang_shared_environment""?

cn flag

I currently have a systemd file called [email protected] that is used for all of my go services.

[Install]
WantedBy=multi-user.target

[Service]
EnvironmentFile=/etc/sysconfig/golang_shared_environment
EnvironmentFile=-/etc/sysconfig/golang_%i
ExecStart=/bin/sh -c /local/%i/%i
Restart=on-failure
RestartSec=2
SyslogIdentifier=golang_%i
User=go_%i

[Unit]
After=network-online.target consul.service
Description=Golang "%i" service
Wants=network-online.target consul.service

I'd like to add an ExecCondition that stops a service called "golang_shared_environment" from starting.

Currently, anyone can start a service using golang@"component_name" and I'd like to ensure certain go services are not started.

This was initially created so that any go service could start using my automation.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.