Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [systemd-unit]

The tag has no usage guidance.

0
votes
2answers
23 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
66 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/...
0
votes
1answer
28 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 --...
6
votes
3answers
283 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....
1
vote
0answers
82 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 ...
2
votes
2answers
110 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
133 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 ...
0
votes
1answer
245 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 ...
2
votes
1answer
271 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 ...
0
votes
1answer
366 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 ...
1
vote
2answers
1k 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 [...
0
votes
1answer
98 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, ...
1
vote
1answer
338 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
1answer
417 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 ...
0
votes
1answer
346 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
199 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:...
5
votes
1answer
4k 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=-...
4
votes
1answer
128 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). ...
0
votes
1answer
465 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 ...
1
vote
0answers
151 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 ...