All Questions
47
questions
1
vote
1
answer
32
views
Systemd: should I use wants/requires for already enabled service listed in After=
I have a systemd service named webserver.service that is wanted by multiuser.target (enabled by default on system). I have another service under another target named test.service that I want to run ...
0
votes
0
answers
102
views
systemd: Failed to attach to cgroup...No such file or directory
OS
Ubuntu-22.04
Kernel-version
6.2.0-39-generic
systemd --version
systemd 249 (249.11-0ubuntu3.12)
Problem description: From a perl script I am trying to stop and start myservice, this script has no ...
0
votes
1
answer
47
views
systemd+ - cannot stop mongo service
I noticed mongo was listening on port 27017
I tried to stop it with:
$ sudo systemctl stop mongod Failed to stop mongod.service: Unit
mongod.service not loaded.
and then I did:
sudo service mongod ...
1
vote
1
answer
242
views
CentOS systemd places service subprocesses started with `sudo` in `user.slice` (instead of `system.slice`)
Subprocesses that are created using sudo within a systemd service are placed in the user.slice. This behavior has been observed only on CentOS 8 (x86_64 20230606) and not on Ubuntu 20.04.5 LTS, where ...
0
votes
2
answers
602
views
Forcing Systemd to Re-Isolate a Target Unit
My goal is to programmatically re-run the graphical target unit using the systemctl command. While I'm aware that I can use sudo systemctl isolate graphical.target, this approach doesn't seem to work ...
0
votes
1
answer
150
views
Bring systemd services up/down along with specific systemd service?
I have systemd:
service1.service
service2.service
service3.service
service1.service looks like:
[Unit]
Wants=service2.service service3.service
After=service2.service service3.service
[Service]
...
0
votes
0
answers
35
views
Systemd service not running after VM reboot [duplicate]
Here is my systemd service status
root@ip-10-111-11-4:/home/foolala# sudo systemctl status mycustom-service.service
● mycustom-service.service - Custom service to manage docker-comopose for foolala ...
0
votes
1
answer
107
views
Does linux/systemd/agetty support doubble ended serial-getty consoles?
My apologies if this is a ultra basic question:
Does linux / systemd / agetty support double ended serial-getty consoles?
For example I have two remote servers A and B, they are running a recent ...
2
votes
1
answer
603
views
Configure cgroups v2 for fair resources sharing between users
Is there a way to restrict system resources to users? I know that used to exist a way of forcing every newly spawned process of a user into the specified cgroup by using cgred service along with /etc/...
3
votes
2
answers
3k
views
Run systemd service only if script condion is True
I have a systemd service that writes to a LCD screen as below;
[Unit]
Description=LCD Screen
[Service]
Type=simple
User=admin
WorkingDirectory=/lcd
ExecStart=sudo /run_lcd.py
StandardOutput=syslog
...
2
votes
1
answer
579
views
how to know that a template systemctl has been stopped
I think my question is similar to this one:
https://askubuntu.com/questions/941775/stopped-custom-services-controlled-by-systemd-do-not-appear-in-systemctl-list-un
But it didn't get any useful answer, ...
1
vote
0
answers
131
views
Run SystemD user service after resume/lock screen
I do have a SystemD user service that powers on an external sound card and external speakers. The unit works great when I initially log in with my user. After resuming the behaviour is different - I ...
0
votes
0
answers
273
views
systemd doesn't read environment variables required for script
I want to use borg backup and systemd timers to do my backups. I am using the script from borg backup website very slightly adjusted. You can see the original HERE and my script below:
#!/bin/sh
# ...
0
votes
0
answers
584
views
systemd service not enabling
I need your help to enable a service that starts and executes on boot a program that I have made. The program is a command line one and takes parameters through the flags therefore in /etc the service ...
1
vote
1
answer
2k
views
How do I write multiple socat statements in a systemd file for restart on failure?
CODE:
/etc/systemd/system/socat.service
[Unit]
Description="socat systemd"
[Service]
Type=simple
Restart=on-failure
RestartSec=10
User=ubuntu
ExecStart = /usr/bin/socat tcp-listen:1111,...