systemd

systemd service for openvpn vs networkmanager-openvpn

systemd service for openvpn vs networkmanager-openvpn I am using Yocto for a rpi4 target. I was using a systemd service to activate my VPN over openvpn at boot: [Unit] Description=OpenVPN connection to .ovpn file After=network.target [Service] Type=forking ExecStart=/usr/sbin/openvpn –daemon ovpn-%i –status /run/openvpn-client/%i.status 10 -cd /etc/openvpn/client/ –config /etc/openvpn/client/%i.ovpn ExecReload=/bin/kill -HUP $MAINPIDy WorkingDirectory=/etc/openvpn/client [Install] WantedBy=multi-user.target I was …

Total answers: 1

Unable to Install Ubuntu 24.04 on a Biostar motherboard

Unable to Install Ubuntu 24.04 on a Biostar motherboard I’ve been attempting to install Ubuntu 22.04 onto my new Biostar motherboard and I keep running into the issue where it’s saying "Failed to start systemd-journald. service • Journal Service". I installed the ISO file into a bootable USB using Rufus. Once booting it gets as …

Total answers: 1

Date is incorrect in wifi : system clock synchronization is not active

Date is incorrect in wifi : system clock synchronization is not active I have compiled a read-only rootfs image with yocto for my raspberrypi4. I have noticed that my date is incorrect uniquely in wifi. Indeed when I type the command timedatectl status I have the following: System clock synchronized: no I do not understand …

Total answers: 1

Is it possible to cancel GNOME's power off end session dialog using DBUS?

Is it possible to cancel GNOME's power off end session dialog using DBUS? The object org.gnome.SessionManager.EndSessionDialog has a Close method which does actually close the dialog. However, the background timer will keep ticking and after 60 seconds (GNOME 42) it will power off the machine. Ultimately what I want to achieve is a way to …

Total answers: 1

systemd.network management

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] Name=ens5 [Network] Xfrm=xfrm0 Then systemctl daemon-reload + systemctl restart systemd-networkd. And – nothing. In systemctl status systemd-networkd it also does not show any references to xfrm: Apr 16 23:52:07 ip-10-100-1-205 systemd[1]: Starting Network …

Total answers: 2

Force reboot if `fstab` mount fails instead of going to emergency mode

Force reboot if `fstab` mount fails instead of going to emergency mode I have a fstab with read-only root-fs and also a rw /var mounted on a USB reader with a µSD in it. Sometimes at boot time system fails to mount /var.  It looks like the system cannot find the partition on the µSD.  My best guess is that the …

Total answers: 1

loginctl enable-linger error Could not enable linger: Access denied

loginctl enable-linger error Could not enable linger: Access denied I have 2 Ubuntu 20.04 servers. One of them gives me this error. Could not enable linger: Access denied when running loginctl enable-linger The other server doesn’t raise any errors. I did a bit of research, but I could not find a solution to my problem. …

Total answers: 1

Is there a way to schedule a lazy timer relative to another timer?

Is there a way to schedule a lazy timer relative to another timer? (x-mas.service) [Unit] Description=Celebrate X-Mas [Service] Type=simple ExecStart=/usr/sbin/x-mas-day [Install] WantedBy=multi-user.target (x-mas.timer) [Unit] Description=Add "X-Mas" to the calendar [Timer] OnCalendar=*-12-25 00:00:00 Unit=x-mas.service [Install] WantedBy=timers.target (buy-presents.service) [Unit] Description=Get your wallet out Requires=x-mas.service Before=x-mas.service [Service] Type=simple ExecStart=open-amazon-dot-com.sh [Install] WantedBy=multi-user.target (buy-presents.timer) [Unit] Description=Buy presents Before=x-mas.timer Requires=x-mas.timer [Timer] …

Total answers: 1

reboot via dbus-send without interaction?

reboot via dbus-send without interaction? trying to investigate why handbrake and kodi cannot shutdown or reboot my system, I narrowed the problem down to these "Interactive authentication required" messages: % dbus-send –system –print-reply –dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot boolean:false Error org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required. % dbus-send –system –print-reply –dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot boolean:true Error org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required. …

Total answers: 1

I have deleted systemd

I have deleted systemd I am a Debian user. I deleted systemd without installing anything else. I ran sudo apt remove systemd. After that, I ran sudo apt autoremove systemd. After that, my laptop can’t connect to the internet, and it doesn’t get me to use the GUI; I’m stuck in the command line interface …

Total answers: 1

How do I automatically set the target context for a .sock file to be **httpd_var_run_t** so that nginx can connect to and write to the socket?

How do I automatically set the target context for a .sock file to be **httpd_var_run_t** so that nginx can connect to and write to the socket? The original file context for /run/unicorn.sock is tcontext=system_u:object_r:var_run_t:s0 How do I have the file context automatically be system_u:object_r:httpd_var_run_t:s0 when I start the socket unit so that the nginx server …

Total answers: 1

fstab and systemd automount overlay

fstab and systemd automount overlay On an embedded device based on Yocto Linux my rootfs is RO, while I have an additional partition for RW data. Now I want to automount at boot an overlay onto /etc stored on a different partition. Here is my fstab: /dev/mmcblk0p6 /data_local ext4 defaults,sync,noexec,rw 0 2 […] overlay /etc …

Total answers: 1

send notification from one systemd unit to another with python?

send notification from one systemd unit to another with python? I have a systemd unit ‘my-app’ that runs my main python app but I want it to auto-update when there is a new version on a remote server. The detection is watched by another python systemd unit (let’s call it "watch-app") on the same OS …

Total answers: 1

Where do args passed to systemd have to reside?

Where do args passed to systemd have to reside? Arguments or -flags can be passed to systemd systemctl when e.g. starting a service. But do the args need to reside in the service systemd somewhere else In other words, must the args be callable to/by the service itself (as I assume)? Asked By: Johan || …

Total answers: 1

How to specify dynamic "Environment" variables in a systemd unit file?

How to specify dynamic "Environment" variables in a systemd unit file? This $(ls -d…) does not work in a systemd unit file: [Service] Type=forking Environment="ORACLE_HOME=$(ls -d /usr/lib/oracle/*/client64 | sort -rV | head -n1)" Environment="TNS_ADMIN=$(ls -d /usr/lib/oracle/*/client64/lib/network/admin | sort -rV | head -n1)" I want to avoid hard-coding the Oracle client version (at the moment 19.19), …

Total answers: 1

What exactly does it mean for a systemd service to be "activating"?

What exactly does it mean for a systemd service to be "activating"? According to various clauses in the docs, the "activating" state is the transition between inactive states and an active state. So far so obvious. But how exactly is it defined? What determines whether a service is no longer inactive but activating? What determines …

Total answers: 1

Wait for systemd oneshot service before shutdown

Wait for systemd oneshot service before shutdown I’m trying to setup automatic execution of a process using a systemd timer and service. The problem is that my oneshot service gets immediately killed on shutdown. How can I tell systemd to not kill oneshot services but wait for it to finish before shutdown? My test.service looks …

Total answers: 1

Systemd service starting before filesystem mount after power loss

Systemd service starting before filesystem mount after power loss I’m encountering an issue with a systemd service starting before a local partition is mounted, particularly after a power loss event. I’ve investigated and found that this problem arises due to a system reboot and subsequent fsck operation. To easily replicate the problem, I’ve created a …

Total answers: 1

need help creating a non-root systemd service

need help creating a non-root systemd service I’m using ubuntu 22 and currently have a user and group named "steam" When I want to run my cs2 server , I first switch to steam user : su steam Then I run the following command : cs2-server @public1 start The above command doesn’t run as root …

Total answers: 1