Skip to main content

All Questions

Tagged with
5 votes
1 answer
390 views

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=$...
Sybil's user avatar
  • 1,913
0 votes
0 answers
69 views

systemd to open a commandline and execute a program in it on bootup

I have made a custom_start.service file in /etc/systemd/system {OS is redhat linux 8.2} [Unit] Description=Auto Start [Service] User=ABC WorkingDirectory=/home/ABC/Desktop/ ExecStart=bash -c "./...
Vinod's user avatar
  • 101
0 votes
0 answers
113 views

How to configure system d service to run stop script before stopping other services in a reboot situation (RHEL 7 and RHEL 9)

I have a systemd service where I have an issue with stopping the service at the time of reboot. The script /home/user1/bin/myscript-shutdown relies on filesystem to be up. But it looks like the file ...
Murthy's user avatar
  • 1
0 votes
1 answer
495 views

ClamD Service Unable to Start [RHEL9]

I am currently following this guide on setting up ClamAV on my AlmaLinux 9.3 machine however at Step 11 I cannot start the clamd@service and wanted to know if anyone else has also had this issue as I ...
hymcode's user avatar
  • 83
1 vote
2 answers
561 views

Unable to start service, auth could not identify password for

Im trying to start a linux service, however im getting the below issue when im trying to start the service. Please help with a solution of how to fix this issue The user Test_user is set with ALL=(...
Chinnu's user avatar
  • 11
0 votes
0 answers
63 views

Put user's unit file in non-default location

My distro is RHEL 8.6. By default, all user's unit files are put in the /home/myuser/.config/systemd/user directory, then systemctl --user daemon-reload make them available. My question is how I ...
Luke Huang's user avatar
1 vote
0 answers
255 views

I get permission denied for a command in an sh script, but same command works from terminal

I have a service run by systemctl in RedHat 8.8. The service itself is relatively simple: cat /etc/systemd/system/myservice.service [Unit] Description=My service After=network-online.target [Service]...
Gábor Major's user avatar
0 votes
0 answers
113 views

How do you pass an array through systemd EnvironmentFile?

[root@vm-devcjn-01-a tmp]# cat /tmp/test_service_script_fred #!/bin/bash sleep 30& echo `date` $# args: $@ > $0.log When called from the shell, passing an array, works as expected: [root@vm-...
Chris's user avatar
  • 1
0 votes
0 answers
41 views

For a systemd template service, status ouput doesn't expand %i in ExecStart

The service script correctly starts a bash script with %i expanded in its name, but when I ask for status the %i isn't expanded. Here are the scripts: #cat /etc/systemd/system/[email protected] # The ...
Chris's user avatar
  • 1
0 votes
0 answers
86 views

Restart systemd service when new user created

I need to restart a systemd service (running as root) every time a new user is created. I saw that some systems have a way to make an adduser hook but this isn't an option in RHEL8. What is the best (...
ridderhoff's user avatar
1 vote
1 answer
416 views

How do I set the size of /run (tmpfs) [duplicate]

I’m running AlmaLinux 9.2 (systemd v.252) on a small embedded(-ish) system, where I like to keep a lot of stuff in /run. When I was using CentOS7.x this was on the order of 1.5G, and I never really ...
Popup's user avatar
  • 646
2 votes
0 answers
274 views

Java process getting terminated in Redhat by SIGTERM from Systemd

I'm starting a Java process using nohup and & (running it in the background). This process gets terminated frequently. There is no pattern on when it is getting terminated. From the application (...
Raghu's user avatar
  • 121
0 votes
0 answers
610 views

user-runtime-dir@0 error

systemd service user-runtime-dir@0 Error in journalctl sudo journalctl -xe -u user-runtime-dir@0 -- Unit [email protected] has begun shutting down. Jul 14 08:00:12 systemd-user-runtime-dir[...
stewchicken's user avatar
1 vote
1 answer
4k views

selinux context for ExecStart of custom systemd service

I have a Type=simple /etc/systemd/system/custom.service. It has ExecStart=/root/scripts/custom.sh. I use this to make various administration things happen automatically after boot. It has worked well ...
ron's user avatar
  • 7,264
0 votes
1 answer
200 views

What containers provide systemd aside from RHEL's UBI?

I have an application I must containerize and it has a dependency on systemd during installation I can't change. It does not need systemd to run, it just has to be there during install. So far, the ...
Grant Curell's user avatar

15 30 50 per page
1
2 3 4 5
7