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
1
vote
0 answers

systemd-nspawn can't auto login

I'm trying to config auto login for my nspawn container and I created /etc/systemd/system/container-getty@.service.d/autologin.conf and inside of that I wrote this config: [Service] ExecStart= ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear…
Jessica
  • 11
  • 2
1
vote
0 answers

What is the best process to install a node based service/daemon/unit on Debian 11?

In this post: [Other serverfault post][1] [1]: https://serverfault.com/questions/1018676/how-to-configure-systemd-service-unit-to-start-node-app-with-npm-start-instead I found that it's possible to add a node based service to the system without…
gwhiz
  • 37
  • 5
1
vote
1 answer

Restart rspamd.service as non-root user

I have webpage with button, when user clicks on button, script restart.sh on server is executed. This script contains: #!/bin/bash systemctl restart rspamd.service After clicking on the button, restart.sh is executed, but rspamd.service is not…
MTC11
  • 11
  • 2
1
vote
1 answer

How to list systemd unit files with descriptions

The command systemctl list-units only displays instances of units, such that are currently loaded into the memory. The command systemctl list-unit-files on the other hand lists all unit configuration files found in the search paths. Unfortunately,…
reign
  • 25
  • 1
  • 3
1
vote
0 answers

systemd fails to restart even after calling reset-failed

We have a need for restarting a service frequently in certain special scenarios. So when it fails with start-limit, the suggested solution is to call "reset-failed". What we found is that, even after calling reset-failed, the immediate subsequent…
1
vote
4 answers

How can I cause systemd to wait starting a unit until a certain condition is fullfilled

I'm still struggling to understand boot sequence dependency configuration in systemd unit files. I've read the manual (systemd.unit). I tried to add dependencies using the After= and Requires= lines to my unit configuration file. However it still…
pefu
  • 679
  • 1
  • 6
  • 24
1
vote
1 answer

amazon-cloudwatch-agent shuts down on every application reload

I have a Tomcat app on Elastic Beanstalk, and I want to send logs to Cloudwatch Logs. To that end, I set up log4j to write to file, and in .ebextension, amazon-cloudwatch-agent is installed and run. commands: # 00_download_and_install: # …
f.khantsis
  • 331
  • 3
  • 6
  • 13
1
vote
0 answers

`bad-setting (Reason: Unit nftables.service has a bad unit file...` when add `/etc/systemd/system` conf to nftables

System is debian 10 with nftables. I plan to make nftalbes auto restart when failed,script as below: cat << EOF >> /etc/systemd/system/nftables.service.d/override.conf [Service] Restart=on-failure RestartSec=1s EOF systemctl daemon-reload Output…
kittygirl
  • 945
  • 5
  • 13
  • 33
1
vote
1 answer

How to use SIGHUP for reloading services?

I've installed Hachicorp Vault and did setup the TLS configuration. My goal now is to have the vault.service to do an automatic reload if the TLS certificates were renewed. The official documentation states: tls_key_file (string: ,…
Kingindanord
  • 125
  • 1
  • 5
1
vote
1 answer

Allow a user to restart a service

I am trying to restart a service without being root. Here is the code snippet where the command being used template { source = "{{vault_template_dir}}/agent.crt.tpl" destination = "{{vault_tls_dir}}/agent.crt" command =…
Kingindanord
  • 125
  • 1
  • 5
1
vote
0 answers

How to troubleshoot a systemd timer on Ubuntu 16.04 that won't re-schedule every minute as expected?

I have an existing systemctl target that was originally (by default installation) scheduled to run everyday, almost continuosly with just a pause of 30 seconds between the end and beginning of each run, i.e. with its default…
develox
  • 41
  • 4
1
vote
0 answers

Mongo Authentication when mongod started as a service

System specs: OS: Debian 10 Mongo Shell: v4.4.4 Mongod: v4.4.4 I successfully created a user administrator for MongoDB with the privileges below (output from show users in Mongo Shell). { "_id" : "admin.admin", "userId" :…
walkmitch
  • 11
  • 1
1
vote
1 answer

systemctl and journalctl can't find charon-system.service

If I run with grep, service is present in output [root@maincore ~]# systemctl status --all | grep charon │ │ └─135060 grep --color=auto charon │ └─127087 /usr/sbin/charon-systemd Unit boot.automount could not be found. …
1
vote
1 answer

How to Set Up Time Synchronization with NTP on Ubuntu 20.04.1 LTS

After updating the base system with the latest available packages: apt-get update -y and root@localhost:~# timedatectl Local time: Wed 2021-01-06 08:03:11 UTC Universal time: Wed 2021-01-06 08:03:11 UTC …
1
vote
0 answers

Warning: The unit file, source configuration file or drop-ins of X changed on disk. Run 'systemctl daemon-reload' to reload units

I am running Debian 10.4 on kernel 4.19.66+. It seems that my unit files are changing on their own (It sounds crazy, I know), with no interaction from me, the only user of the system. I found this user, who was trying to determine what changed in…
Brandon
  • 11
  • 1
  • 3