Questions tagged [systemd-unit]
For questions about the design of systemd units, the relationships between units, and writing [Unit] and [Install] sections of systemd unit files. It can also be used for questions about units which do not have their own tag such as systemd targets.
183 questions
0 votes
1 answer
29 views
Systemd mount unit files with ConditionPathExists with same Where and different What clauses
I need to mount either one of two devices to the same mount point. I cannot find a way to do that using .mount unit files because of the requirement that the .mount file name must be same as Where ...
0 votes
1 answer
47 views
Why this systemd service of type "notify" won't be waited for by dependent services?
My application consists of two programs, and three processes: one main application, and two identical child processes. They are launched using some wrapper scripts, but (I think?) that it's not ...
0 votes
3 answers
71 views
inject a service into the active boot process
I want to create a separate one-time action during boot. Does systemd support this? I have a script like this, but the generated unit is not started: #!/bin/bash set -ex s=y.service cd /run/systemd/...
3 votes
2 answers
779 views
"Permission denied" error while trying to create and run a systemd service
I have been able to create and run (as root) a systemd service that runs a "Hello World" script logged in as root. The script is just a shebang and an echo command. This is /etc/systemd/...
1 vote
1 answer
102 views
Process can't create tun/tap when run as non-root systemd --user service even with CAP_NET_ADMIN
I'm trying to run nebula (an overlay networking tool) as a systemd user service, NOT as a system service with user and group defined in the unit file. All examples about running a service with ...
1 vote
1 answer
43 views
Is it possible for a service unit to report failure/degraded state without exiting?
I have a custom process that I'd like to execute through systemd. The process has some internal retry logic on failure. Is there a way that I make the process show up as a failure in systemd ...
1 vote
0 answers
65 views
Restart systemd service *without* restarting dependents
I have four systemd services: {a,b,c,d}.service. d.service is the "main" service, and it is the one that parses the configuration file for all four. Typically, the four are started together. ...
4 votes
2 answers
200 views
How to start multiple systemd services within a target sequentially
I have a large set of systemd services that are part of a single target running on an embedded system with a relatively slow file system. When starting the target, our most significant startup delay ...
0 votes
0 answers
38 views
Maintainer scripts to remove excessive dependency symlinks for services
I have a package to maintain, which has a WantedBy dependency. It must also save it's state after being updated (enabled/disabled, active/inactive after package was updated). Suddenly I needed to ...
1 vote
1 answer
71 views
systemd: how to make unit to only react on other unit start or maunal start
I need to write a systemd unit that: starts if another specified unit was started; starts if started manually; do not start at boot if specified unit didn't start at boot; do not stop if specified ...
0 votes
0 answers
59 views
system service: scheduling a variable timer
I am writing a program that I would like to have the ability to schedule an action. This would work similar to the the TIME option in shutdown, where the user specifies a time and that information ...
2 votes
0 answers
130 views
Why does systemd restart my (healthy) service?
I have a systemd service for an application that is the primary workload for the machine it is running on. In my logs, I see that systemd restarts this service and as far as I can tell, the service is ...
0 votes
1 answer
91 views
Is it safe to clean up (delete) references to missing systemd units?
List missing services systemctl --state=not-found --all Output: UNIT LOAD ACTIVE SUB DESCRIPTION ● boot.automount not-found ...
0 votes
1 answer
184 views
User systemd exited and removed semaphores
I use a systemd service to start several processes when Ubuntu 20.04 starts up. # MyApp start app service [Unit] Description=MyApp start service Requires=network-online.target After=network-online....
3 votes
0 answers
232 views
How can I use --machine to see another user's units in journalctl?
With systemctl, I can start and stop the user service units of a different user using: sudo systemctl --user --machine=OTHER_USER@ stop their.service How can I achieve this behaviour with journalctl? ...