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.

Filter by
Sorted by
Tagged with
1
vote
1answer
2k views

How do I setup user autostart and properly configure systemd user services?

On my arch server, I was setting up users restricted to their home directories. I ran: useradd -m -s /bin/bash username and passwd username I've read this wiki article... I figured I should use ...
12
votes
3answers
2k views

“before” and “want” for the same systemd service?

In this example of a systemd unit file: # systemd-timesyncd.service ... Before=time-sync.target sysinit.target shutdown.target Conflicts=shutdown.target Wants=time-sync.target systemd-timesyncd....
31
votes
2answers
14k views

Documentation of =- (equals minus) in systemd unit files

On my Archlinux system, the /usr/lib/systemd/system/mdmonitor.service file contains these lines: [Service] Environment= MDADM_MONITOR_ARGS=--scan EnvironmentFile=-/run/sysconfig/mdadm ExecStartPre=-...
3
votes
2answers
5k views

creating OS environment variables using ExecStartPre on Systemd

I have the following unit file: [Unit] Description=Panel for Systemd Services After=network.target [Service] User=pysd Group=pysd PermissionsStartOnly=true WorkingDirectory=/opt/pysd ExecStartPre=/...
3
votes
1answer
58 views

Create a new systemd unit/service/timer/sockets with systemctl from the command line?

Given the CLI tool systemctl edit can be used to edit existing systemd units such as services, timers, sockets, devices, mounts, automounts, targets, swap, path, slice, scope or nspawn files and you ...
0
votes
1answer
664 views

systemd: Unknown key name 'ConditionEnvironment' in section 'Unit'

I'm using systemd version 246: $ systemctl --version systemd 246 (246.2-1-arch) +PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +...
0
votes
1answer
234 views

How can I define the output directory a bundled .NET Core SingleFile published app will be deployed to?

I am deploying a .NET Core Worker Service app in linux, as a systemd daemon/service, as recommended. The .NET Core app is published using the SingleFile property, which generates an all-in-one exe ...