Questions tagged [systemd-unit]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
3answers
389 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....
5
votes
1answer
6k 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
1answer
177 views

Why does a systemd unit file at `/usr/lib/systemd/system/` still works for Ubuntu?

I understand that systemd stores unit files at different locations for different versions of Linux. On RHEL, it's at /usr/lib/systemd/system/, whereas on Debian-based machines it's at /lib/systemd/...
3
votes
1answer
293 views

Systemd Unit File - WantedBy and After

I have a question regarding making my own unit (service) file for Systemd. I've read the documentation and had some questions. After searching around, I found this very helpful answer that gives some ...
3
votes
1answer
144 views

Systemd: Start lots of services one after the other without specific depencies

I have a system composed of about 15 services. They have no inter-dependencies (i.e. no service require another to start) and they notify systemd when there start-up is finished (i.e. Type=notify). ...
2
votes
2answers
2k views

Failed to determine supplementary groups: Operation not permitted

I'm trying to set up watchman as a user service. I've followed their documentation as closely as possible. This is what I have: The socket file: [Unit] Description=Watchman socket for user %i [...
2
votes
2answers
324 views

How can I view journalctl logs by unit and identifier with one command?

I have a vpn service unit for which I can view the logs with... journalctl -u vpn I also have a script that interacts with the vpn manually and is logged to journal with... exec > >(systemd-...
2
votes
1answer
317 views

Systemd - Invert Conditions in unit file?

I'm attempting to make a systemd service that should only start if a certain file doesn't exist on the file system. If I use ConditionPathExists this will make the service start only when the file in ...
2
votes
1answer
343 views

/run/user/$UID not mounted when daemon starts

When I reboot my Raspberry Pi (Stretch) a daemon fails to start because /run/user/1000 does not exist. This is my unit file: [Unit] Description=SBFspot Upload Daemon [Service] User=pi Type=forking ...
2
votes
0answers
25 views

Stopping broken systemd service on init

I wanted to make a service that can shutdown the server every day at 9:30 pm. But I accidently set it up so the shutdown service runs on boot. So whenever I turn on the server, it shuts itself down ...
1
vote
1answer
519 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 ...
1
vote
1answer
412 views

systemd invalid argument - debugging delayed hibernation service file

I'm trying to implement the delayed hibernation unit. I'm on arch/antergos. >>> systemctl enable suspend-to-hibernate.service Failed to enable unit ...to-hibernate.service: Invalid argument ...
1
vote
0answers
176 views

How systemd Type option affects starting other units?

The man page systemd.service(5) explains the Type options for services: Type= Configures the process start-up type for this service unit. One of simple, forking, oneshot, dbus, notify or ...
0
votes
1answer
498 views

How to enable systemd unit to run at startup

I have a service that processes items from a RabbitMQ queue, of which I spool additional instances as the queue grows in size. How can I enable systemd to start a single instance of the unit at ...
0
votes
2answers
236 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=/...
0
votes
1answer
501 views

SystemD `Requires` fail when required unit fails for the first time

I have created a SystemD unit to start a service, and that service requires another unit to start beforehand. I've set the depending service with Requires=dependant.service, and that way when ...
0
votes
1answer
121 views

Specify a systemd unit for cronjob

When I run a cronjob, it's nice being able to follow its logs. If I want to see all logs from cron with journalctl, I can select the cron unit (journalctl -u cron). But when I have multiple cronjobs, ...
0
votes
1answer
147 views

How to check status for user level systemd unit

If alice has a user level systemd service unit named foo.service located at /home/alice/.config/systemd/user/foo.service then I can switch user to alice and check the status of the unit using the --...
0
votes
1answer
455 views

How to set cronjob or unit file to run after reboot

I have created cronjob as @reboot root sleep 75 && firefox but then I test it, but it didn't work. In /var/spool/mail/root it shows me this what I want to archive is after every reboot I ...
0
votes
1answer
395 views

systemd multiple unit files for a single service

I am having a postgresql database on SLES 12 SP3 system whose service is managed by systemd through the standard unit file. I wanted to automatically restart the service on failure, so create the ...
0
votes
0answers
224 views

systemd pathexists not triggered when booting

I tried to configure my trackpoint sensitivity on my ArchLinux using the systemd path unit as described here: https://wiki.archlinux.org/index.php/TrackPoint#systemd.path_unit My files look like this:...