Questions tagged [systemctl]

systemctl is the main command to control and introspect the systemd Linux init system.

systemd is a system and service manager in Linux. More information about switches and arguments can be found here.

228 questions
0
votes
0 answers

How to I setup default php-fpm service if I have two versions of php

I am having two versions of PHP on an ubuntu server that is 8.1 and 7.4 I installed both PHP-fpm extensions and I have this in /var/run/php php7.4-fpm.pid php7.4-fpm.sock php8.1-fpm.pid php8.1-fpm.sock php-fpm.sock I expected that running…
novapack
  • 101
  • 4
0
votes
1 answer

How to avoid ExecStop status in systemctl status

systemctl status command shows the ExecStop Failure message. Even though my service is up and running. testDB.service - the testDB service Loaded: loaded (/usr/lib/systemd/system/testDB.service; enabled; vendor preset: disabled) Active: active…
user1631072
  • 1
  • 1
  • 1
0
votes
1 answer

Ansible - No such file error when activating systemctl Podman user socket

I am running an Ansible playbook on a fresh Oracle Linux 8 system. It includes a step where it asks systemctl to activate a user Podman socket like so: - name: Enable podman socket vars: userid: ansible_facts.getent_passwd.{{ ansible_user_id…
hpy
  • 845
  • 3
  • 18
  • 28
0
votes
0 answers

RHEL 7 systemctl: Combine multiple services into one. start the service independently

I have followed the steps from RedHat to start the multiple services into one service. https://access.redhat.com/solutions/3097871 /etc/systemd/system/myapps.target [Unit] Description=App Service Unit # This collection of apps should be started at…
user1631072
  • 1
  • 1
  • 1
0
votes
1 answer

Possible attack on my vserver - outgoing tcp/ip connection

I have a suspicious situation on my vServer (Centos 7). An unknown bash script is consuming all the memory from the server. There is a noticeable connection to the "outside". Unfortunately my Unix knowledge is limited. How can I forbid a connection…
ChaosSpeeder
  • 103
  • 2
0
votes
1 answer

Starting a Systemctl Service - Setting up uWSGI

I'm trying to set up uWSGI on Ubuntu 20.04, I'm trying to create a systemctld unit file but I'm struggling to start the service. The commands: sudo systemctl start myproject sudo systemctl status myproject Output: ● myproject.service - uWSGI…
0
votes
2 answers

systemd ExecStartPost is executed too fast

We have a unit file which: uses ExecStartPre which generates a config file ExecStart uses the config file to start a service ExecStartPost which deletes the file created by ExecStartPre. (the file has hardcoded passwords and we do not want to keep…
danidar
  • 53
  • 2
  • 8
0
votes
1 answer

After= option not working in systemd service file

I have two shell scripts name first.sh and second.sh. The contents of first.sh and second.sh are given below: >>first.sh #!/bin/bash while true do echo The current time is $(date) sleep(1) done …
0
votes
2 answers

systemd service reports "unknown port"

On a CentOS 7 server,I'm creating a new systemd service from scratch for a new service, prometheus-slurm-exporter. (It's an application that exports data from the SLURM scheduler on an HPC cluster.) By default it uses Port 8080, but since that port…
Dave_G
  • 1
  • 1
0
votes
1 answer

Cannot kill - nginx: master process nginx -g daemon off

I am setting up both Nginx and OpenRusty on my Ubuntu , one thing confuses me is , even after I quit OpenRusty and stop Nginx , I can still observe a nginx running , seems like this process cannot even be killed , My question is who launch this…
Jia
  • 101
  • 2
0
votes
0 answers

Display service output on console using systemctl

I have following service file - [Unit] Description=Open VPN Agent After=syslog.target After=network.target [Service] Type=forking TTYPath=/dev/pts/0 KillMode=process PIDFile=/opt/openVPN/pids/openvpnAgent.pid ExecStart=/opt/openVPN/openvpnAgent…
user784524
  • 1
  • 1
  • 2
0
votes
1 answer

How do you kill all instances of a systemd service?

I want to kill all instances of a systemd service. This works fine: sudo systemctl stop 'custom-service@*' but it is slow since it runs my custom ExecStop which does extra work to safely shut down the process. In certain cases, I'd rather just kill…
zzbomb
  • 103
  • 3
0
votes
1 answer

Cannot stop screen started with systemctl start

On ubuntu server 20.04 I created a service definition for a Minecraft server within a screen session like that [Unit] Description=Minecraft Server After=network.target [Service] User=minecraft Nice=1 KillMode=none SuccessExitStatus=0…
Jan
  • 111
  • 3
0
votes
1 answer

simple systemd service and socket failing

I had a service I was trying to run this way but it was slightly a large python program. I took a step back and built a dead simple python program to see if I can get it to run. It fails when I try to connect via telnet to this socket running. …
Codejoy
  • 107
  • 5
  • 17
0
votes
1 answer

Redhat 7.3 Sybase 16 (edge) issue with systemctl auto startup process

After installing Sybase 16 (Edge) and successfully upgrading a 15.7 instance to Edge, and then trying to add the sybase service with systemctl so that sybase starts up automatically when the Redhat 7 server is booted I am getting this error==>…