Questions tagged [systemd]

systemd is a modern replacement for the traditional Linux init. Its main features include the ability to express dependencies between services and aggressive parallelization of service startup.

systemd, created by Lennart Poettering and Kay Sievers, is a modern replacement for the traditional Linux init, whether System-V or BSD-style initscripts. Its main features include the ability to express dependencies between services and aggressive parallelization of service startup.

1471 questions
9
votes
4 answers

systemd-networkd and direct routes

I have problem adding direct routes through systemd-networkd. What I'm trying to achieve is similar to: ip a a 192.168.0.2/32 dev enp0s3 ip r a 192.168.0.1/32 dev enp0s3 ip r a default via 192.168.0.1 This is weird setup, I know, but I can't use…
Ineu
  • 280
  • 1
  • 2
  • 8
8
votes
2 answers

PostgreSQL systemd service is /bin/true

postgresql.service contents is # systemd service for managing all PostgreSQL clusters on the system. This # service is actually a systemd target, but we are using a service since # targets cannot be reloaded. [Unit] Description=PostgreSQL…
8
votes
1 answer

How to silent a systemd service?

I've created the following systemd service: [Unit] Description=ISPConfig DC…
Diogo Braga
  • 441
  • 1
  • 8
  • 17
8
votes
1 answer

View unbuffered log output from journalctl

I have several systemd services defined. They log both to disk and also to the systemd journal, which I can monitor using journalctl -n 0 -fu myservice. However, I notice that the logs that I see from the journalctl tail command are often several…
amoe
  • 185
  • 1
  • 9
8
votes
1 answer

Introspection of initramfs systemd services - How?

Background I'm running ArchLinux, using the systemd binary to start necessary services as part of the initramfs (root fs decryption, mounting etc.). I would like to examine what systemd units are started as part of this stage, and…
Benjamin
  • 250
  • 2
  • 9
8
votes
0 answers

DHCP interface never transitions to configured state in systemd

I have a server running CoreOS, and my main network interface that gets configured via DHCP gains a carrier and is routable, but never leaves the configuring state. This causes systemd-networkd-wait-online.service to fail. Looking at the journal…
Bryan
  • 205
  • 1
  • 5
  • 13
8
votes
1 answer

Creating multiple Apache instances on CentOS 7 SystemD

I am trying to create a duplicate httpd service in systemd on CentOS 7 (why? see bottom) This is what I have done so far: #Copy all the files cp -pr /etc/httpd /etc/httpd-bobby cp /usr/lib/systemd/system/httpd.service…
8
votes
2 answers

systemd ignores return code while starting service

I ran into this problem while writing unit-file for one simple daemon. When daemon returns '1' on startup systemd just ignores it, and it looks like daemon was started successfully while it's actually dead. For example, I have very simple shell…
Paul K.
  • 125
  • 1
  • 1
  • 9
8
votes
2 answers

Run a systemd unit in a specified network namespace

I would like to instruct systemd to 'run a unit' in a specified, pre-existing network namespace, in particular to start the unit's process(es) in the namespace.
A__A__0
  • 423
  • 2
  • 8
  • 17
8
votes
1 answer

Getting journald logs to a plain text file

I want to log journald logs to a file so I can later on fetch it and send it to Logstash. I thought about running syslog-ng and make it a client of journald, so I'd get syslog files. I'm using Docker containers on a CoreOS machine, so I tried to run…
Jose Armesto
  • 181
  • 1
  • 1
  • 4
8
votes
3 answers

How to escape spaces in systemd unit files?

My unit file looks like this (already attempted to escape spaces as \x20 like the docs say): [Unit] Description=My…
Cobra_Fast
  • 650
  • 2
  • 8
  • 23
8
votes
3 answers

How to ensure sshd is the last service to be stopped during shutdown?

I have noticed that when I issue a reboot command, my SSH connection is immediately closed on CentOS 7. It does not mean the server has rebooted, as I can still ping it. It seems systemd is killing sshd too early. Sometimes a service will get stuck…
gtirloni
  • 5,746
  • 3
  • 25
  • 52
8
votes
1 answer

How do I lock down nginx on debian wheezy (running systemd)?

The systemd unit file that comes with the nginx-common package runs the master process as root, which makes me nervous. I assume the only reason it runs as root is to bind port 80, but being root is overkill for that, so I am running it as a normal…
ashleyh
  • 81
  • 3
8
votes
3 answers

systemd ExecStartPost doesn't look to be called

I used the following config to start beanstalkd process [Service] ExecStart=/usr/local/bin/beanstalkd ExecStartPost=pgrep beanstalkd > /var/run/beanstalkd.pid The last line is supposed to generate a pidfile after the process in launched, but the…
jney
  • 233
  • 1
  • 2
  • 8
8
votes
2 answers

Why does my systemd timer only trigger once when the unit is a target?

I have a couple of services (static site generators) that I want to trigger on a regular basis from the same systemd timer. I found this question/answer, which covers exactly what I want to do, and describes a setup whereby a .target file that…
Paul
  • 251
  • 1
  • 8