All Questions
290
questions
0
votes
0
answers
54
views
Systemd service for backup during boot or shutdown
Is it possible to configure systemd service that will delay the boot process (by about 10-20 minutes) to run a local backup script (something like dd if=/dev/sdb of=/dev/sdc) while filesystem is still ...
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
1
answer
37
views
How is the default nice value of a user's processes implemented in Ubuntu server 22.04.4 LTS
I've noticed that all services and processes with my user in Ubuntu Server 22.04.4 LTS have a nice value of 19. I connect to the server through ssh, and my ssh sessions also have a nice value of 19. I ...
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
31
views
Systemd timer only starts when service is stopped
I have a service that runs a python script:
[Unit]
Description="Daily python service"
[Service]
WorkingDirectory=/home/ubuntu/python_project/
ExecStartPre=/bin/bash -c 'truncate -s 0 /var/...
1
vote
2
answers
65
views
systemd.network management
I try to follow the manual example from man systemd.network:
# /etc/systemd/network/27-xfrm.netdev
[NetDev]
Name=xfrm0
Kind=xfrm
[Xfrm]
InterfaceId=7
# /etc/systemd/network/27-eth0.network
[Match]
...
0
votes
1
answer
150
views
Fake /etc/os-release for an application to make it think it runs on Ubuntu instead of Debian
I have to use a third party software which officially supports RHEL, SuSE (SLE[DS]) and a certain Ubuntu LTS release.
Unfortunately, I use Debian on all my systems.
If I run the installer script of ...
0
votes
0
answers
38
views
How to force systemd unit to log into journal instead of syslog
For some time now I'm trying to force systemd unit I created to log command output to systemd journal. It logs only to syslog. Here is my config:
$ cat /etc/systemd/system/sf-synchronize.service
[...
1
vote
0
answers
104
views
Ubuntu service - pq: password authentication failed for user "root"
I have an application running on Ubuntu server that's using PostgreSQL.
I can run the application's executable (as a non-root user) from the project's directory.
I have created a service for this ...
0
votes
1
answer
77
views
How to let kea-dhcp4-server wait on postgresql database being ready during boot on Ubuntu 22.04?
My kea-dhcp4-server has a dependency on my postgresql database. After a fresh boot the dhcp server has an error like:
sudo systemctl status kea-dhcp4-server
× kea-dhcp4-server.service - Kea IPv4 ...
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 ...
0
votes
1
answer
117
views
systemd service restarting without any obvious cause
I have two Spring applications that chug along nicely, nothing special happening, and then out of the blue the applications restart; journalctl shows these lines:
Jan 15 04:43:11 nyota.softworks.nl ...
0
votes
0
answers
153
views
How can i run a ros2 launch file on startup?
I have a python file running the ros2 launch file
process = subprocess.Popen(["/opt/ros/humble/bin/ros2", "launch", "blaunch_pkg", "on_startup.launch.py"])
...
0
votes
1
answer
66
views
How to indicate hour range in Timer using OnCalendar?
systemd 219 version
Ubuntu 22.04.2 LTS
[Unit]
Description=Run myscript.service every 5 minutes
[Timer]
OnCalendar= *-*-* 10-23:10/5:00
Persistent=true
[Install]
WantedBy=timers.target
I need to run ...
0
votes
0
answers
33
views
migrating app from upstart to systemctl failing with 'dead'
new to this area, and trying to setup this project on Ubuntu 20.04.6 LTS
https://github.com/thoukydides/heatmiser-wifi
the project is no longer maintained, but the instructions talk about using ...
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 ...
1
vote
0
answers
65
views
Cause a script to execute when the default route is changed
I have 2 interfaces: the Ethernet (metrics 1) and 4G (metrics 2). When the first disappears the second is used, when the Ethernet comes back, the first one is used again. I would like to send a ...
0
votes
0
answers
102
views
Systemd with Gitlab-runner and Manual commands works differently
I have a python-based tg bot that is supposed to run as Systemd service. Service file goes as following.
[Unit]
Description=Telegram ImageBot
After=syslog.target
After=network.target
[Service]
Type=...
0
votes
0
answers
128
views
Restarting systemd service on path change takes a long time
I have a systemd Ubuntu service of type simple, call it foo.service, with a Python script that is being executed, in ExecStart.
Then another service, of type oneshot, call it foo-restart.service that ...
0
votes
2
answers
191
views
Reorder of launching Systemd services
OS: Debian 11 Bullseye
Context:
The Zerotier application adds the zerotier-one.service system service and creates a virtual network interface (when it works).
The sshd server default listens to all ...
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
474
views
how to add PID inside cgroup.procs with non-root privileges in cgroup-v2 in Ubuntu
I created cgroup in /sys/fs/cgroup. I called it testGrp and I need this cgroup to be controlled by non-root user so I changed the ownership of the whole cgroup directory
/sys/fs/cgroup$ sudo chown -R ...
1
vote
1
answer
126
views
Systemd path PathExists= doesn't work if tracked file is deleted inside Unit=?
I have simple systemd.path restart.path:
[Unit]
Description=
[Path]
PathExists=/home/ubuntu/restart
Unit=restart.service
[Install]
WantedBy=multi-user.target
And the triggered restart.service ...
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 ...
3
votes
1
answer
343
views
Longest ExecStart command line
I have been reviewing a lot of systemd job files, and found a systemd unit file on Ubuntu 20.04.2 with a ExecStart command that is 4284 characters long, it occurred to me to ask - what is the maximum ...
0
votes
0
answers
527
views
Failed to hibernate system via logind: Not enough swap space for hibernation
I'm trying to hibernate via systemctl hibernate but get Failed to hibernate system via logind: Not enough swap space for hibernation
LANG=C swapon
NAME TYPE SIZE USED PRIO
/swap/swapfile ...
0
votes
1
answer
3k
views
How to enable DNS over HTTPS (DoH) on Pop!_OS 22.04
I recently started using Quad9 DNS and now want to enable DoH(not DoT). I was looking to enable it without any third party software (This is already possible on Windows). All the guides I can find are ...
0
votes
1
answer
236
views
ethercat install on ubuntu 23.04 RPi gives modprobe invalid argument error/empty MAC address?
Installing ethercat from https://gitlab.com/etherlab.org/ethercat.git to an RPi 3B v1.2 running Ubuntu Server 23.04 (32-bit). First time working with Ubuntu; more familiar with Raspbian.
Spent a long ...
0
votes
2
answers
1k
views
How to mount VeraCrypt or TrueCrypt volumes with the boot password
For Windows, VeraCrypt implements a feature called "system favorite volumes".
It allows mounting additional discs
with the password entered at boot to unlock the system partition.
Specs: I ...