Questions tagged [systemctl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Always run Mongo Service

I need to start mongo database for my NodeJs app on my VPS, I did : sudo systemctl start mongod So if I want to start it a boot I did : sudo systemctl enable mongod Buf what if mongod crash how can ...
0
votes
0answers
9 views

Waiting for mount before executing a systemd service

I have a problem during startup of my device running Embedded Linux. My systemd service runs before some partitions get mounted which is not acceptable. I can list my mounts with command systemctl ...
0
votes
0answers
23 views

`systemctl disable` deleted the unit file from /etc/systemd/system - is a dump of in-memory copy possible?

What happened: I've placed the unit file (openmeetings.service in my case) to /etc/systemd/system (which was probably wrong place and my terrible mistake) and then started adjusting it to match my ...
1
vote
1answer
63 views

What causes systemctl to show or hide memory or CPU usage of services?

Today morning: # systemctl status udev ? systemd-udevd.service - udev Kernel Device Manager Loaded: loaded (/lib/systemd/system/systemd-udevd.service; static; vendor preset: enabled) Active: ...
0
votes
0answers
27 views

Migrate custom initctl emit command to systemctl (upstart to systemd)

I have a custom service (I did not create it) that stops multiple services. The server currently uses upstart, and I need to migrate to systemd. I discovered from this question that I cannot use ...
0
votes
1answer
37 views

How to correctly enable a service on a CentOs 7 machine using systemctl enable command?

I am not a sysadministrator (I am a software developer) but this time I have to install some agents on some CentOS machines that have to be monitored by Wazuh (a SIEM software) and I have the ...
1
vote
0answers
38 views

systemd-networkd resets my static eth0.network configuration

I am running a custom Yocto based Linux with kernel version 5.4.41. I am using systemd-network to manage my networks. root@box:~# systemctl --version systemd 244 (244.3+) +PAM -AUDIT -SELINUX +IMA -...
1
vote
1answer
32 views

unable to make it so docker starts up automatically

Per https://docs.docker.com/engine/install/linux-postinstall/#configure-docker-to-start-on-boot I tried sudo systemctl enable docker. I then restarted and typed in sudo docker ps and... nothing. When ...
0
votes
0answers
36 views

eth0 not set up after network.target is reached

When I reboot my Raspberry Pi 4, the OpenSMTPD (an alternative to postfix) service fails to start: ● opensmtpd.service - OpenSMTPD SMTP server Loaded: loaded (/lib/systemd/system/opensmtpd.service; ...
0
votes
1answer
99 views

MX Linux - can't shutdown/ reboot - /usr/bin/systemctl: Syntax error: Unterminated quoted string

Today i tried to install snapd, I found that it's not so easy on MX Linux as on different distributions. I found this (also this ) link where I had to add some script to my /usr/bin/systemctl. It didn'...
1
vote
1answer
7k views

Ubuntu systemctl service fails with: Main process exited, code=exited, status=1/FAILURE

I am writing a python script that subscribes to some MQTT topics to localhost MQTT broker and when a message is pushed, the script will call a function in another script on the same directory to load ...
0
votes
0answers
13 views

How do I list systemd's /sys/subsystem/net hierarchy?

When using systemd, you sometimes have to list things like /sys/subsystem/net/... (for instance in /lib/udev/rules.d/99-systemd.rules), or sometimes expressed as sys-subsystem-net-devices-...
0
votes
0answers
31 views

Error restarting SAMBA, requires force

Under CentOS 7, I am running a SAMBA server. Recently, likely after some updates, has become a bit less stable. The log shows periodically: change_to_user_internal: chdir_current_service() failed! ...
0
votes
0answers
31 views

tail command and systemctl restart hangs

I run Ubuntu 16.04.2 LTS server with web services. When executing tail -f on a file and then pressing Ctrl+C process dies and turns into D state The same thing happens when trying to restart any ...
0
votes
0answers
50 views

How to create a systemd service for Rails

I need to create a systemd service for starting rails on my machine. Usually for running it I give the command rails s. But now I'd like and need to create a service for it. How could I do? Thank you ...
1
vote
0answers
28 views

Take dektop screenshot from macOS launch agent

I have the following script to take a screenshot programmatically $ cat /Users/bamboo/capture/capture #!/bin/bash screencapture -o "$(dirname "$0")/screenshot.png" When I run ...
0
votes
1answer
50 views

systemctl --user doesn't load on startup, even though manual 'start' works well

I have systemctl --user set up, that doesn't activate the service on startup. $ cat .config/systemd/user/syncthing.service [Unit] Description=Syncthing - Open Source Continuous File Synchronization ...
0
votes
1answer
32 views

What is the order in which the bootup tasks are run?

I have a Debian 10 server and I'm running a systemctl service on it. I am using systemctl enable myservice to run it at startup. Also, I have a few lines of bash script, which help set up networking/...
0
votes
0answers
87 views

run systemctl from php exec command

I am writing small code for my index.php page in which I would like to have a button to execute the start and another one the stop of a service. The problem I have is that this command is not executed....
0
votes
0answers
19 views

ubutnu, sudo service --status-all is listing an uninstalled service as running

For some reason, php7.2-fpm which no longer exists on the server is being shown as running when executing sudo service --status-all, according to systemctl it doesn't exist so I can't run disable on ...
0
votes
0answers
130 views

Why my service override is not in effect when used with SysV generated service?

I have service called minidlna on my raspberry pi configured as follows # Warning: minidlna.service changed on disk, the version systemd has loaded is outdated. # This output shows the current version ...
6
votes
2answers
28k views

How to enable systemd on WSL2: Ubuntu 20 and CentOS 8

I'm on WSL2 (Windows Subsystem for Linux, v2) and got the CentOS 8 WSL from: https://github.com/yuk7/CentWSL And the Ubuntu 20 WSL downloaded from Windows Store has no systemd enabled too. Got it ...
1
vote
1answer
404 views

Shorter output from systemctl status

Is there a way to get shorter/custom output from systemctl status? I really only need the active line prepended with the name of the service. So something like this: apache2: active (running) ...
1
vote
1answer
2k views

systemd service not executing script?

I'm using a Debian 9.11 system. I ran into a problem where systemd service runs my script but does not produce the desired result. I created a script named my_autossh.sh and put it under /usr/bin. ...
2
votes
2answers
3k views

Loading configurations failed while starting prometheus service in Ubuntu 18.04

I have an Ubuntu 18.04 OS and I have installed prometheus on it following steps here (I just changed links and versions). But when I tried to start the service with sudo systemctl start prometheus, I ...
2
votes
0answers
628 views

systemctl hibernate gives error not enough swap space for hibernation although the swap space in use is four times the RAM size

I already know that in Linux systems systemctl hibernate will not allow hibernation if there is not enough swap space for hibernation. But in my case the swap space was set to 32 GiB while the RAM ...
1
vote
1answer
52 views

Which file to add systemctl startup paramaters to?

I am running transmission through systemctl start/stop transmission-daemon. I want to add some logging paramaters to transmission when it starts but I am not sure which file to add them to. I have ...
0
votes
1answer
1k views

Rhel 7 : systemd fails to start a process if background option is given

I have a systemd unit file (serv_unit.service): [Unit] Description=My service [Service] Type=simple Restart=always RestartSec=60 StartLimitInterval=400 StartLimitBurst=3 ExecStart=/etc/init.d/...
0
votes
1answer
4k views

systemd failed at step user spawning no such process

I am trying to run my custom service using systemctl, but it alwasy gave me error: Oct 29 14:09:30 ip-10-0-0-215.ap-southeast-1.compute.internal systemd[12402]: Failed at step USER spawning /home/ec2-...
1
vote
2answers
674 views

Similar commands with find are not outputting the same

I'm trying to run a find command on a directory which contains unit files: find /home/pi/units -type f -name "*.service" which returns /home/pi/units/manager.service I then want to pipe that ...
1
vote
1answer
245 views

Can't start Apache in chroot with systemctl but can run it manually on my own from Bash with no issue

How to keep my Apache webserver running (prevent from being killed off for some unknown reason) in chroot when launched with systemctl at boot? My setup requires multiple scripts and when I start the ...
0
votes
1answer
24 views

Perform a command when a specific text occurs in a log file

Is there any way to achieve something like this? Whenever some specific word (or combination of them) occurs in log file, I want to perform specific action. For example: whenever there occurs a word "...
0
votes
1answer
1k views

Restart OpenVPN systemctl service when inactive

I've got a problem, with systemctl service restart. I setup an OpenVPN service, starting with the system, with [Unit] # HTPC Guides - www.htpcguides.com Description=OpenVPN connection to %i ...
0
votes
1answer
2k views

CentOS 6.9 systemctl not found

To list all running or stopped or failed services, systemctl (soon to become systemd in CentOS 7) is just so nice. I just type systemtcl with nothing after it. service --status-all gives much fewer ...
0
votes
1answer
379 views

Failed to get D-Bus connection: Opération non permise

I'm using a centos 7 OS, I have removed /var/run/dbus/system_bus_socket after i accidently removed the /var/run folder. Now when i'm trying to use systemctl command i'm getting the error mentioned ...
0
votes
1answer
5k views

systemctl cannot start service (code=exited status =0/success)

I installed Shadowsocks-r in my CentOS 7 server, and I want to use systemd to manage it. So I created a file in /etc/systemd/system called shadowsocks-r.service. shadowsocks-r.service: [Unit] ...
0
votes
1answer
15 views

systemctl and where programs are installed

I am on an amazon linux instance that is based afaict on centos : e.g. I have used sudo yum install -y mysql and sudo yum install -y postgresql While these did install without errors I do not ...
2
votes
0answers
29 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=...
5
votes
1answer
1k views

Why does systemctl show high memory usage when top and htop show much less?

I'm running an apache2.4 web server, and noticed that when I run systemctl status apache2 or run service apache2 status, it says it is using 4.2GiB of RAM, which isn't a problem for the amount of RAM ...
0
votes
0answers
460 views

On Linux Solus Budgie, hibernate shuts down instead of hibernating

I have 16GB RAM laptop equipped with an SSD drive with three partitions: a 20GB linux swap partition a bootable standard linux partition (hosting in my case Solus Budgie 4.0) a bootable standard ...
0
votes
1answer
1k views

What are the service running for mssql server on linux, and how to check if they are running

On microsoft's site I can see the mssql-server on linux has following components Mssql server (database engine) SSIS (integration services) full text service High Availability I can only see if ...
1
vote
1answer
158 views

systemctl service doesn't start

I have made a service for my RaspBerryPi project. When I start it nothing happens. systemctl status sb.service returns this: Failed to start RPI-sound board. Unit entered failed state. Failed with ...
1
vote
1answer
134 views

Translating sysV init script to systemd

I have init script which works fine. On a good day It will do all the following; /etc/init.d/my-good-script.sh {start|stop|status|info|check|config|timetravel} Now since systemd is the new norm, I ...
0
votes
1answer
133 views

Verify autofs is not enabled in Slackware 14.2 - Disabling Automount

I want to disable automounting in Slackware. With this goal I want to verify if autofs is enabled. Below are the commands that I saw which is applicable in other Linux Distributions : chkconfig --...
0
votes
1answer
276 views

systemctl input method setting

I want to input Korean language on Ubuntu 18.04, electron application. When the electron application is started on terminal by using yarn start, Korean language input works well via ibus. But, when ...
5
votes
1answer
6k views

setting environment variables from command line inside unit files

I am trying to set a date inside the unit file for logging my unit file look like this: [Unit] Description=Jetty service After=multiuser.target [Service] Environment=MAIN_CLASS="com.candorgrc....
2
votes
1answer
1k views

Can't start Minecraft server in tmux with systemctl

I'm trying to automate my Minecraft server because having to manually wrangle tmux sessions gets really old after a while. Here's the systemd service file I wrote to help me with that: [Unit] ...
0
votes
1answer
141 views

CentOS won't boot when disk is removed

In my system I have a boot drive (xfs) and a RAID (ext4). The RAID is /dev/sda so I have added that in fstab to auto-mount at startup. /dev/sda /mnt/RAID ext4 defaults 0 0 Today ...
0
votes
1answer
459 views

systemctl set-property user-1009.slice CPUQuota=50% Failed to set unit properties on user-1009.slice: Unit user-1009.slice is not loaded

I'm trying to set per-user limits on processes, most of them are run with sudo --user. Why do user-1001 and user-1008 on my system have the slice files, but I can't get it on 1009? # systemctl set-...
0
votes
0answers
943 views

SLES 12 Service start and stop order doesnt work

my system runs on suse enterprise 12 sp2. I have two services sapinit and sapcontrol. At startup the service sapinit has to be started before the sapcontrol service can start and at shutdown or stop ...