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

systemd mount unit name different on different VMs

I see that on some VMs, the unit that mounts hugepages is called mnt-huge on some and just huge on others: # systemctl list-units | grep huge mnt-huge.mount loaded active mounted /mnt/huge Is there a way to change this (make it…
Ani
  • 32
  • 2
  • 13
0
votes
0 answers

systemd service starts ok, but hangs after restart

I am having a weird problem, I have set up a custom systemd service running a dotnet project. When the system first starts up, the service also starts just fine, however when I restart it, it hangs. System is Ubuntu 20.04 on Azure. Here's the…
Aviad P.
  • 103
  • 1
  • 9
0
votes
1 answer

podman load executed in systemd service not taking effect on fcos system

Hi I'm new to FedoraCoreOs. But I'm trying a very simple probe of concept. I'm trying to load a .tar docker image into the fedora core os local registry at starup. I'm using systemd and a service which will perform the load, but I'm missing…
0
votes
1 answer

systemctl hangs when starting sshd, but "/usr/sbin/sshd -D -f /etc/ssh/sshd_config &" works

CentOS 7. Here's /usr/lib/systemd/system/sshd.service [Unit] Description=OpenSSH server daemon Documentation=man:sshd(8) man:sshd_config(5) After=network.target…
debugman
  • 1
  • 1
0
votes
0 answers

Starting screen session as a service, how do I transmit the screen session output (back) to the service log?

I have an application that is a interactive shell. I want this application to run as a service. To be able to access the shell while the service is running, I figured its best to start the service as a screen session that launches the…
birgersp
  • 107
  • 5
0
votes
1 answer

How to install Micro Focus Data Protector Client 10.91 on SLES 15 SP2?

Micro Focus Data Protector 10.91 should work with Linux distributions like SLES using systemd, but it seems client instalation does not work: When I try to install the client, I get an error message ("[110:101] Client import failed!") while the…
U. Windl
  • 366
  • 3
  • 17
0
votes
1 answer

How to create a systemd "start all" template unit file from an upstart script with multiple services?

I'm in the process of migrating all custom upstart scripts to systemd. I've come across a script that utilizes multiple services. I cannot figure out the proper syntax to handle this, or if I need to just create separate .service unit files for…
DevOpsSauce
  • 348
  • 1
  • 5
  • 22
0
votes
0 answers

When I "stop" a system process, the "ExecStart" command process does not stop

I run a system service with the following config my_script.service: [Unit] Description=My demo…
Newskooler
  • 211
  • 1
  • 3
  • 14
0
votes
0 answers

Presenting a systemd service

Hello I need to present some Linux systemd services that I created but in some king of diagrams (I know it s not nice first code and than the design). I was searching but did't find anything. Does anyone have some template that I can be inspired…
0
votes
1 answer

Tail the journalctl log on failure to restart systemd service?

I want to know if there is a brief way to check the last 50 lines about a service that threw an error on restart. $ sudo service nginx restart Job for nginx.service failed because the control process exited with error code. See "systemctl status…
listenlight
  • 103
  • 2
  • 4
0
votes
1 answer

nginx.service is not starting after mount

I have a nginx that depends on a mounted drive. My nginx.service has an entry with the RequiresMountsFor in the service unit like this: [Unit] RequiresMountsFor=/media/bar But looks like it is still booting ahead of the mount point. My mount cmd…
0
votes
1 answer

Verify in ExecStartPre if bash binary exists

I want my service to start only if another service is not active. To do so, as explained in this other question, I am going to do: ExecStartPre=/bin/bash -xc '/usr/bin/systemctl is-active --quiet other-unit.service && exit 1 || exit 0' However,…
mosquetero
  • 299
  • 2
  • 12
0
votes
0 answers

Openconnect Systemd Unit Hardening: How to restrict access to devices and users

I am hardening my systemd service file for openconnect(8). In my setup, I am using vpn-slice to setup routes (I pass arguments such that it doesn't write to any files) and use various files to define connection parameters and credentials. My target…
steiny
  • 173
  • 2
  • 8
0
votes
1 answer

nginx autostarted after shutdown with systemctl

I'm running Linux Mint 19.2 Tina, which should be equivalent to Ubuntu 18.04. When I issue the command sudo systemctl stop nginx.service then systemctl start nginx.service I frequently get the error Job for nginx.service failed because the control…
0
votes
2 answers

Howto create custom service in systemd?

Running Fedora 33/34 on multiple machines. I successfully activated rc-local.service which works fine. I have couple of other scripts that I need to run in /etc/init.d/ and I created similar service files as rc-local.service, but I can't enable…
DenisZ
  • 38
  • 7