Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

6

The convention is that /usr/lib is for files installed by the system, and /etc is for local configuration.


3

When systemd starts up, or when systemctl daemon-reload is run, systemd runs a systemd-sysv-generator program, which will make a list of /etc/init.d scripts and generate corresponding .service units for them unless a systemd-native .service unit already exists for them. The generator will interpret any LSB header blocks in init.d scripts. They look like ...


3

The Restart setting doesn’t work like that; quoting the manual, When the death of the process is a result of systemd operation (e.g. service stop or restart), the service will not be restarted. systemctl allows you to specify the state you want a service to be in: systemctl start specifies that it should be running, systemctl stop specifies that it ...


2

The above worked for me (systemd version 231) by also adding StandardInput=tty as otherwise top refused to run with error failed tty get.


2

There are various command-line tools to make dbus calls; systemd comes with one called busctl. So you can call StartTransientUnit from the command line. The command The syntax is positively annoying, but it looks like this (for one process id, 14460): busctl call --user org.freedesktop.systemd1 /org/freedesktop/systemd1 \ org.freedesktop.systemd1....


1

That sounds like a bug, but I'd try [Service] IOSchedulingClass=best-effort CPUSchedulingPolicy=other to work around it. Those are the default values, taken from the ioprio_set and sched_setscheduler manpages. You can, of course, also override the entire unit file by putting one with the same name in /etc/systemd/system/. Sensible to avoid doing this as ...


1

If we include Restart=always in the .service file, does this mean that it again executes ExecStart after the script finishes and hence keeps executing the script in a loop? The Restart option is only invoked if the started process exits; with always, according to the systemd.service documentation, the service will be restarted if the process exits due to: ...


1

You’re running the service from your user manager (--user), and apparently your logind doesn’t have lingering enabled for you. As a result, your session (including any services started inside it) is closed down whenever you log out. To change this behaviour, you need to enable lingering: sudo loginctl enable-linger $USER This will start a user manager for ...


1

The Packages list for Ubuntu 18.04 LTS shows, in the admin section, that systemd is used, not upstart. Ubuntu even provides a comparison. *.wants directories hook units into the start-up of other units, without having to modify their unit files. Units are 'plain text ini-style file that encodes information about a service, a socket, a device, a mount ...


1

service is an "high-level" command used for start, restart, stop and status services in different Unixes and Linuxes. Depending on the "lower-level" service manager, service redirects on different binaries. For example, on CentOS 7 it redirects to systemctl, while on CentOS 6 it directly called the relative /etc/init.d script. On the ...


1

A way to go about this would be by using a socket. Of course, this implies that you need to use network socket libraries in your processes, but this is the most common way of allowing two processes to communicate. Since the two processes are on the same machine, I suggest you configure a systemd unix socket. Then, Process A can connect to the socket to ...


1

After trials and errors, this is the solution I implemented. I attached my script to a systemd service: [Unit] Description=Make VMs reachable from the internet Wants=network-online.target After=network-online.target [Service] Type=oneshot ExecStart=/home/…/virbr0-enable.sh [Install] Alias=makeVMvisible.service WantedBy=multi-user.target I made it wait ...


1

It turns it on for sibling cgroups, as well as it's parent cgroup (and their siblings, but not their children). This is because with cgroups, all cgroups on a level must have accounting enabled if a single cgroup has it enabled. For example, if you turn on cgroups accounting in a example.service, it'll enable accounting for the parent system.service and the ...


1

it's not possible. This feature was implemented for the .rules-variant only https://github.com/systemd/systemd/pull/1159


1

The following offered to provide clarity on what /etc/environment is/does, when its' consulted and what package provides it: whereis /etc/environment environment: /usr/lib/environment.d /etc/environment Feeding the results of whereis above, we confirm /etc/environment is a SystemD file: sudo dpkg -S /usr/lib/environment.d systemd, snapd: /usr/lib/...


1

I encountered exactly this problem. The solution I found (by reading the watchdog docs at http://www.sat.dundee.ac.uk/psc/watchdog/Linux-Watchdog.html) was to edit the name of the kernel module (iTCO_wdt) into /etc/default/watchdog. So change the line: watchdog_module="none" to watchdog_module="iTCO_wdt" Didn't need to change any of the blacklisting ...


1

Why: This error is being caused by a combination of things: 1) The command th-cmd --socket /var/run/thd.socket --passfd --udev produces a segfault. This seems to be because triggerhappy hasn't been patched to address a number of issues reported over the last 4 years... https://github.com/wertarbyte/triggerhappy/issues 2) Unfortunately, the error will ...


Only top voted, non community-wiki answers of a minimum length are eligible