Questions tagged [systemctl]

Questions about systemctl - the main tool to interact with systemd and the service manager.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Start & Stop systemd units one after another

I have 2 different services gateway.service and plugin.service After referring systemd unit documentation, able to start both services using Requires= directive. Scenario working: When gateway....
0
votes
0answers
26 views

Launching Electron on Ubuntu WSL

I am running a WSL2 Ubuntu system. I'm attempting to follow this tutorial to launch an Electron boilerplate: https://github.com/electron-react-boilerplate/electron-react-boilerplate When running yarn ...
0
votes
0answers
33 views

Using systemd to start an application

I want to create a linux service to start another application. For simplicity's sake let's just say it's Firefox. System Info: ➜ ~ lsb_release -a No LSB modules are available. Distributor ID: ...
0
votes
0answers
11 views

monitoring service on redhat server by snmp

I have a server dedicated to running syslog-ng and service crash sometimes (I don’t know why for now). I would like to find a way to monitor this service or sending a trap when syslog-ng crashes. ...
0
votes
0answers
24 views

my telnet server software does not send characters correctly when called by systemctl

I have written a socket based BBS package. If I run the binary from the command line: /usr/local/bin/coderunner then client sessions see highbit characters correctly. However, if I run systemctl ...
0
votes
1answer
41 views

systemctl throws error

I just started to learn about systemctl, I tried to create a service file that will run a nodejs script but it fails to run and the error doesn't really tell me why. Here are the steps I've taken: 1)...
0
votes
1answer
73 views

What does Restart=on-abort mean in a systemd service?

I'm trying to get a service that is dieing to be restarted automatically. I didn't write the service, it came from another vendor so while I want to track down the root cause of the service crashing, ...
0
votes
1answer
33 views

systemd: was the service stopped before `systemctl stop`?

When I do systemctl stop service on a stopped or failed service, it returns 0 and no output. I need to know whether it was running before I call this. Calling systemctl status before stopping is not ...
2
votes
2answers
39 views

systemd unit enabled but does not start on boot for user, only for root

I am lost, I don't know why this does not work for the user on reboot: (not working means: if I start it manually using systemctl --user start nostc it works perfectly, no errors. In the logs there ...
0
votes
0answers
18 views

Setting a property on a systemd timer unit

I have been using the crontab for some time, but I'm entirely new to managing timer units through systemctl. I have been a CentOS 5/6/7 user, and now I want to move to 8, which has undergone a massive ...
0
votes
0answers
31 views

Remove Boot Error

Because of its intended usage, I'm trying to lock down my Raspberry Pi into a read only. I'm using this script, though it is for an older distro. Not unexpectedly, I'm getting an error during boot: ...
0
votes
1answer
31 views

How to make .service condition script under /etc/systemd which would stop/kill service when certain condition is fullfilled?

I have service like below, but how to add condition which would stop/kill the service when certain condition is fullfilled, for ex /tmp/killsoc file exist? [Unit] ...
0
votes
0answers
35 views

Why does systemd report job failure for some services with Type=simple?

According to systemd documentation, systemd will report success as soon as the child process have forked off. This is consistent with results from my quick test: $ cat /etc/systemd/system/test....
0
votes
0answers
243 views

The service is actually an init script but the system is managed by systemd warning

After execute manually systemctl start example.service then it starts up but not as part of ansible automatically, while other applications with same config it starts up. What does The service is ...
0
votes
0answers
46 views

Debian 10 Service not starting

Hello everyone, I want to create a service for Debian 10, but when I try to run it with the command “sudo systemctl start boot_time”, it doesn’t start. But it does start if I launch the script ...
1
vote
1answer
154 views

Watch systemd service status with systemctl

Is there any option that allow watching the status of a systemd service in real time with systemctl What i'm actually doing: (not real time) systemctl status tor For example: systemctl watch tor
0
votes
1answer
151 views

systemctl authenticating as other user

I have made this script that allows non-root access for a directory so a program can make changes to files in said directories. This .service has worked on a few machines and even on the same machine ...
1
vote
1answer
188 views

How should i enable UFW: through “systemctl enable” or “ufw enable”?

I know two ways to start UFW: through systemctl and through ufw itself. For example, when i use systemctl enable ufw, i get this status: systemctl status ufw ● ufw.service - CLI Netfilter Manager ...
0
votes
1answer
29 views

Ubuntu: starting one service causes others to be non responsive

Ubuntu 18.04 Server I have multiple services running, that are all something like following template: [Unit] Description=projectA After=multi-user.target [Service] WorkingDirectory=/media/...
0
votes
1answer
34 views

What does puppet do to fix a 'stuck' systemctl service where systemctl would refuse to start a service?

We had a scenario where on RHEL we couldn't start an application that had been running and we had just stopped. sudo systemctl start myservice We didn't have access to the journald logs on this ...
0
votes
1answer
23 views

Application systemctl not executing entire row of ExecStart from file httpd.service

The exact file location is: /etc/systemd/system/multi-user.target.wants/httpd.service I modified the ExecStart line to reflect the following: ExecStart=echo START && echo test > /root/out....
0
votes
0answers
192 views

systemctl start custom.service does not return

This is my custom service file (elastalert.service) [Unit] Description=Elastalert Documentation=https://elastalert.readthedocs.io/en/latest/elastalert.html#configuration Wants=network-online.target ...
0
votes
0answers
36 views

EnvironmentFile not read in systemd - AWS EC2 Linux2 [duplicate]

I'm trying to configure environment variables to a service that's setup with systemd. The service is starting fine with systemctl start onboarding.service but somehow the environment file present in ...
1
vote
0answers
42 views

How to know why a service was restarted by systemd?

I have a host running rsyslog which uses imuxsock to accept messages from journald. However, during boot, after rsyslog is started, it is restarted (stopped and started) again by systemd. I need to ...
0
votes
1answer
24 views

Variants of startup scripts

i have read of multiple options to have a script executed on startup on my gentoo linux: systemd-service init.d local.d cron are there any other options beside these?
0
votes
1answer
21 views

How do I list a systemd unit's wants?

I know that I can see a unit's dependencies with systemctl list-dependencies unit, but is it possible to see a tree of reverse-dependencies?
0
votes
1answer
53 views

systemd service does not last more than 6 hours

I am getting this error message in my logs: Stopping User Manager for UID 1000 I think that's the reason why my systemd service does not keep running. Does anyone know what that means, and how I ...
-1
votes
1answer
34 views

How to start systemctl service with different env vars / diff arguments?

Say I have a service definition like: [Unit] Description=ES log capture After=network.target StartLimitIntervalSec=0 [Service] Environment=emit_only_json=yes Environment=ec2_logging_machine_ip=ec2-...
0
votes
0answers
22 views

Is 'active (exited) Since <date> 2 minutes ago' a correct status for SAMBA?

I am new to linux, and I just set up openmediavault distro. It's a distro with FTP server, web server, SAMBA server.... It's in my old PC, I can ping it from windows PC, I can ping windows PC from ...
0
votes
1answer
52 views

How to print the result of the awk command with the custom header

am trying to print the all the running services in my machine. For that i use the command a=$(sudo systemctl list-units --type service --all | grep running | awk -v OFS='\t' '{ print $1, $2, $4 }') ...
0
votes
0answers
57 views

systemctl stop not stopping all process in redhat

I am starting a service using systemctl ,but I am facing issue to stop the service in redhat system. the service file I am creating : [Unit] Description=/home/agenttest After=syslog.target [Service]...
3
votes
1answer
617 views

systemctl check if a unit (service or target) exists

I would like to know if a certain systemd unit exists. This should work for: any type of unit (service, target, mount, ...) running, disabled or masked unit I know I could do this: systemctl list-...
1
vote
1answer
2k views

How can I reboot a server with systemctl if systemctl reboot fails?

I tried rebooting my CentOS 7 server but it gives ridiculous error messages. As root (of course): # systemctl reboot Authorization not available. Check if polkit service is running or see debug ...
9
votes
3answers
2k views

systemd: Can't unmask root mount (-.mount)

(Dist: Debian 10) I have a reoccurring error message that mainly pops up when using systemctl (also when installing a package, and occasionally in a few other places that escape me), Unit -.mount is ...
0
votes
1answer
33 views

Which process changes my configuration?

I have a systemctl service with ip route add, ifconfig, arp and ethtool commands to configure dynamically 2 interfaces. Somehow, after some seconds/minutes or randomly, the configuration just ...
1
vote
0answers
634 views

systemctl enable docker container service - failed

I basically follow the document in AWS https://docs.aws.amazon.com/AmazonECS/latest/developerguide/example_user_data_scripts.html I created a Centos 7 and tried to install docker, ese-agent within my ...
2
votes
1answer
2k views

Startup Debian 10 error: networking.service loading failed

I've noticed that every time I turn on my PC, there is a line in red. My PC is pretty fast so I don't get to read the problem. I haven't experienced or noticed any problem with my system, but I'm ...
0
votes
0answers
3k views

sudo systemctl can't operate (PID 1)

I am creating a server node red for Ubuntu. I used command sudo systemctl daemon-reload but then I get the following error "System has not been booted with systemd as init system (PID 1). Can't ...
0
votes
0answers
35 views

Restart a service as long as a directory is not empty

How can I restart a service unit that is triggered by a path unit on DirectoryNotEmpty as long as the directory is not empty? The service I am triggering is processing only one file of the directory ...
2
votes
1answer
75 views

How to obtain the environment variables of a process started by systemctl?

Question Given a systemctl template and unit file as follows, I am trying to obtain the environment variables that will ultimately be passed to a process on start (regardless of whether the service ...
2
votes
0answers
88 views

systemctl custom service doesn't start on boot, but starts OK manually

I have a Debian stretch on RPI. I need to start a custom service on boot up. /lib/systemd/system/lora-packet-forwarder.service Service is enabled, but shows up as inactive lora-packet-forwarder....
1
vote
1answer
108 views

Difference between mounting approaches

As far as I know, there are 3 ways to mount a filesystem in Linux. using the mount command writing a unit file and then activating it with systemctl using systemd-mount Can anyone please ...
0
votes
0answers
22 views

How to add an existing process to systemd [duplicate]

Now I have a process and I want it to be supervised by systemd. How do I add it to systemd as a service without restart the process? (Add a supervisor on the fly) I just want to use systemd to ...
1
vote
1answer
125 views

Systemd auto restart service not working if it stopped

I want to add a feature to a project that auto starts a service. My service file contains: [Unit] Description=example Server After=network.target [Service] Type=idle ExecStart=/opt/xxx/xxx/sample....
0
votes
0answers
19 views

Should systemd service unit's have different names than daemon usernames

I often executed the following command and have always thought in my head "give me the logs for user httpd". journalct -uhttpd Wait a second. I don't have a user httpd, only apache. And upon ...
0
votes
1answer
982 views

service command does not recognize the service file. RHEL6.9

I'm using rhel6.9 and I've copied my service file to both /etc/systemd/system and /usr/lib/systemd/system/ folders. I have set up services using systemctl before, but I have never tried it with the ...
3
votes
1answer
971 views

systemctl cannot restart sshd

Strange thing happens: via systemctl I cannot start SSHD: SERVER:~ # systemctl status sshd ● sshd.service - OpenSSH Daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor ...
0
votes
1answer
28 views

How can KDE reboot a Debian system? [duplicate]

I'm experimenting around with Debian and I'm wondering about their permissions concerning systemd and reboot. I made the following obersvations (Debian Buster with lightdm and i3 WM): The commands ...
2
votes
1answer
81 views

auto mount by service + service not mount the folder automatically

we create the following service on redhat version 7.2 more nfsshare.mount [Unit] Description=nfs mount script Requires=network-online.target After=network-online.service [Mount] What=...
1
vote
2answers
2k views

systemctl list all possible (including disabled) services

I have a "service" that originates from an /etc/init.d/XX script, and a systemd wrapper is generated for it. It doesn't autostart in any runlevel, and when I run systemctl --all or systemctl list-...