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
0
votes
1 answer

How to run a command as systemd DynamicUser

I am setting up a daemon for a web service and I want to use the systemd DynamicUser=yes feature because it seems cleaner not pollute the user table with a different user for each service. As is customary, my web service has an integrated command…
cmc
  • 677
  • 6
  • 7
0
votes
1 answer

Systemd NetworkNamespacePath not working

I'm trying to launch an app inside a network namespace from a systemd service. I tried using NetworkNamespacePath= but when I use it all network requests fail. If I launch the app in ExecStart using ip netns exec it works, but it's not very clean…
Fr3ddyDev
  • 101
0
votes
1 answer

VLAN interface is not acquiring specified IP Address using systemd-networkd on Ubuntu

My configuration is: The files in /etc/systemd/network: File: eth0.1.netdev [NetDev] Name=enp2s0.1 Kind=vlan [VLAN] Id=1 File: 30-static.network [Match] MACAddress=b8:ae:ed:eb:b9:2c [Network] Address=192.168.1.44/24 …
Sunny
  • 381
  • 1
  • 6
  • 16
0
votes
0 answers

Ubuntu 20.04 unable to set static IP address reverts to presumably thru DHCP

I have the following files in /etc/systemd/network (filename followed by content) on a Ubuntu 20.04 server: File: /etc/systemd/network/10-debug.conf [Service] Environment=SYSTEMD_LOG_LEVEL=debug File:…
Sunny
  • 381
  • 1
  • 6
  • 16
0
votes
0 answers

Can a bash script detect if it's **not** being run inside a `systemd` service?

I have a bash script. This script can be started as part of a systemd service (or transient systemd task with systemd-run). One can also run it stand alone. How can I see if “the current script” is being run as part of a systemd service? I can see…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
0
votes
0 answers

Docker - Failed to connect to bus error on some containers provisioned with docker-compose

I have 3 clusters to deploy on containers provisioned with docker-compose, the clusters have 3, 4 and 14 nodes each. All containers are built from the same image of Rocky Linux 8 and have SystemD with multiple services running on them. In each…
mac13k
  • 133
  • 7
0
votes
1 answer

What are the arguments for systemd-coredump

What should the input arguments be for /lib/systemd/systemd-coredump ? My core_pattern is |/lib/systemd/systemd-coredump %P %u %g %s %t %c %e ..but I'm getting 0;1;31msystemd-coredump@9-2647-0.service: Failed at step NETWORK spawning…
komodosp
  • 121
  • 6
0
votes
1 answer

How to put a command that autostart daemon before login in Ubuntu server 20.04

I have two programs in Ubuntu server 20.04, that located in: /home/kiko/go-btfs/cmd/btfs /home/kiko/node5007/cmd/btfs They both run with command: ./btfs daemon How to make this command for both directories to autostart before login for server? I…
0
votes
0 answers

Can docker compose execute a command at stopping?

Whenever a container is stopped, restarted or deleted, I would like it to execute a bash command for the host machine. E.g. fusermount -u /path/to/folder But I have not figured out a way to do this in the compose file. What I have in mind is similar…
user760466
0
votes
1 answer

Issues installing Rootless Docker

I am attempting to install rootless docker on Almalinux 8.6. I am running the appropriate script after disabling rootless docker: dockerd-rootless-setuptool.sh install and I keep getting the following failure: [INFO] systemd not detected,…
Factor Three
  • 101
  • 1
0
votes
1 answer

How can I get systemd to grab service logs from a docker image?

So, as the title suggests, I have a containerized service running in docker, and I have a systemd service unit to manage said service automatically. Alongside that, I would like to have the logs for the docker container sent to the service logs. Is…
Slips
  • 1
0
votes
1 answer

How to enable and restart a systemd service after changes to their configuration

Given a set of previous task whose results I register, I want to: Enable my target service. Restart/reload it when any of the dependencies have changed.
Petr
  • 581
  • 1
  • 5
  • 16
0
votes
1 answer

systemd-launched service exists in /var/lib/systemd but not visible in list-units, list-unit-files or status

I'm seeing the following in /var/log/auth.log Jun 1 06:32:49 [redacted] su: (to nobody) root on none Jun 1 06:32:49 [redacted] su: pam_unix(su:session): session opened for user nobody(uid=65534) by (uid=0) Jun 1 06:32:49 [redacted] systemd:…
Ex Umbris
  • 854
  • 7
  • 24
0
votes
1 answer

shutdown and systemd service

At 5am cron runs shutdown, systemd executed /home/myuser/bin/mailme-shutdown.sh and my pc poweroff. When I startup the pc an email coming to me. The email is the script (mailme-shutodown.sh) executed before I powered up the pc. Any idea to send…
Pol Hallen
  • 1,095
  • 2
  • 13
  • 24
0
votes
1 answer

How do I autostart a program with a "X" second delay after internet connection is established at login (LINUX)

I want to use systemd to configure this, do I have to create a custom target and then custom services on it to make this happen? How do I do that?
daedalus
  • 21
  • 1
  • 2