Questions tagged [systemd]

Systemd is a system management daemon designed for Linux. Use this tag for *programming questions* using systemd or its libraries. Questions about *configuring the daemon* (including writing unit files) are better directed to Unix & Linux: https://unix.stackexchange.com.

Systemd is a system management daemon designed for Linux and programmed exclusively for the Linux API. For systems using it, it is the first process which is executed in user space during the Linux startup process. Therefore, systemd serves as the root of the user space's process tree.

2384 questions
0
votes
1 answer

Wrap sd_bus in single file descriptor

I'm writing a library which will use sd_bus under the hood. My goals are Allow integration into any existing main loop (don't force a choice on clients) Stable ABI The ability to add more internal event sources later (more sockets, etc.) Hide…
jforberg
  • 6,537
  • 3
  • 29
  • 47
0
votes
0 answers

Breaking ordering cycle by deleting job

We have some application that use Docker in Azure Vm (centos7). We use systemd in order to manage their lifecycle in case of failure. A typical example of this is this service unit: [Unit] Description=Service…
0
votes
0 answers

Error starting a tmuxinator session via systemd service on Ubuntu 18.04

I have a tmuxinator (note not tmux, tmuxinator) project running on Ubuntu 18.04 (running in headless/server mode). My tmuxinator project file is located in the default directory of /home/karsh/.tmuxinator/testProject.yml. When I am SSH'ed into…
Karsh
  • 19
  • 3
0
votes
1 answer

Bash doesn't interpet \x20 as a space in directory path

I am trying to convert a systemd service to sysvinit, while trying to run the following service named mullvad-vpn; #!/bin/sh ..... . /lib/lsb/init-functions prog=mullvad-daemon PIDFILE=/var/run/$prog.pid DESC="Mullvad VPN daemon" start() { …
0
votes
0 answers

having issues getting systemd process to execute successfully?

I am currently trying to set up a bash script that records the ipv6 address of a host machine (raspberry pi running buster) and writes it to an env file the script creates. The script runs fine if I execute manually, but it doesn't seem to execute…
LoF10
  • 1,907
  • 1
  • 23
  • 64
0
votes
1 answer

Linux: Triggering desktop notification pop-up when service is executed with systemd

I want to trigger a desktop notification pop-up when a service is executed with systemd on my Linux desktop. The main reason why I am doing this is that I want to learn how to work with systemd timers and services by creating my own scheduled jobs…
Tomáš Kruliš
  • 167
  • 2
  • 9
0
votes
1 answer

Permission denied for .NET core service in Linux

I created a worker service in .net core 6 like example here and deployed it in Centos. its unit is like [Unit] Description=my test app [Service] Type=notify ExecStart=/usr/bin/DaneshAfzar [Install] WantedBy=multi-user.target systemctl start…
0
votes
2 answers

Bash won’t recognize existence of closing single quote in systemd unit file

I have the following systemd unit file set to automatically update all Arch Linux and AUR packages at the same time (using the yay AUR helper, of course) while also attempting to temporarily add (and then delete after it’s done, for obvious reasons)…
realkstrawn93
  • 722
  • 1
  • 6
  • 13
0
votes
1 answer

How to run node.js script from systemd service

I have a node.js script in my directory on my raspberry pi /home/pi/my/app/here/app.js When I navigate using cd my/app/here and run node app.js my script executes without any problems. However, when I try to execute this script from a service in…
scapegoat17
  • 5,509
  • 14
  • 55
  • 90
0
votes
1 answer

detecting directory changes with entr

I want to run a command each time a directory is updated (new/changed file within). I found this thread suggesting entr. I've made a script applying entr but it doesn't seem to work as intended. #!/bin/bash ls -d * /Users/me/test | entr echo…
Brian Barry
  • 439
  • 2
  • 17
0
votes
1 answer

Prometheus: 'unknown lvalue' after adding retention time property

Prometheus was working fine until I added --storage.tsdb.retention.time=1y. Service file looks like…
tomi
  • 373
  • 1
  • 5
  • 16
0
votes
1 answer

Running Docker as a Service - Environment Variables

I am attempting to run my docker container in my linux server and configure it as a systemd unit to manage itself. My /etc/systemd/system/system.service file features this line: [Unit] Description=Your Container…
Don Draper
  • 137
  • 1
  • 3
  • 12
0
votes
1 answer

How to create PID file from ASP.NET Core application under Linux

I wrote an ASP.NET Core application (.NET 5 actually) and run it under Linux as a systemd service (following this Microsoft guide). Then I wanted to monitor this application with monit application. This application requires services to create a PID…
Rychu
  • 765
  • 1
  • 4
  • 20
0
votes
1 answer

Exit code of a jvm application running as a systemd service

I'm running an application written in scala (running on the jvm) as a systemd service configured with ExecStart=java -jar Darts-Backend-assembly-0.1.0.jar. On systemctl stop darts the application is terminated by sending it a SIGTERM signal.…
mrArkwright
  • 254
  • 2
  • 10
0
votes
0 answers

Installing and updating npm packages locally without a home directory (Avoid EACCES error)

Tl;dr: I don't want npm to mess with my home directory while locally installing and updating packages. How do I do that? I'm creating a systemd service with node and npm. To run this service, I created an underprivileged user account that doesn't…
martian17
  • 418
  • 3
  • 14
1 2 3
99
100