systemd is an alternative approach to SystemV init daemon for Linux. It is intended to provide a better framework for expressing services' dependencies, allow more work to be done in parallel at system startup, and to reduce shell overhead.

learn more… | top users | synonyms

4
votes
2answers
43 views

How to fix unit attribution of last lines of systemd logging before exit?

I have a systemd service which logs to stdout. From there, systemd captures STDOUT and writes it to the journal. I use a common idiom for handling an error where I echo some diagnostics, then exit ...
4
votes
2answers
56 views

Explanation of file - org.freedesktop.login1.policy

I am using Ubuntu 16.04. There is a file located at /usr/share/polkit-1/actions/org.freedesktop.login1.policy which seems to control the permissions regarding shutdown/suspend/hibernate options. ...
4
votes
1answer
212 views

what tools to investigate failure to suspend on laptop lid close?

My laptop sometimes suspends when the lid is closed, and sometimes doesn't. Here's some output from journalctl, which shows the suspend triggering maybe one in five or six times -- Logs begin at Sat ...
4
votes
2answers
2k views

How can I enable wpa_supplicant on boot?

I'm trying to enable wpa_supplicant on boot in Fedora 20. I created /etc/wpa_supplicant/wpa_supplicant.conf and am able to connect to my wireless network manually by running wpa_supplicant -B -i ...
4
votes
2answers
667 views

Wildcard automounts with systemd

I’m running jessie/sid with systemd 208 and try to convert the following wildcard autofs configuration to either an /etc/fstab or .mount/.automount definition. $ cat /etc/auto.master /home/* -fstype=...
4
votes
1answer
228 views

How can I stop an amok running process from logging to systemd?

There's a process on my system called demond which logs around 100 entries to the systemd journal every 15 seconds: Okt 11 04:58:42 scarecrow demond[1692]: [P:1692 T:108160832] src/discovery.c : 158 ...
4
votes
1answer
589 views

How do I connect a 3G dongle using systemd?

At startup, usb-modeswitch automatically switches the dongle to modem mode and the device shows itself as 12d1:1506. After this, a script should run, connecting to the Internet. I am not sure about ...
4
votes
1answer
95 views

How do you disable a service in systemd?

I know what the command is sytemctl disable NAME but I have a question about the NAME parameter. For example the bluetooth service[1] on Fedora 21. For the NAME parameter should you put bluetooth or ...
4
votes
1answer
678 views

After switching to Devuan, how do I remove systemd?

So, I've also switched from Debian to the Devuan pseudo-fork. But - this doesn't get rid of systemd... I've followed the instructions here, and did: # apt-get install sysvinit-core sysvinit sysvinit-...
4
votes
2answers
684 views

Can a systemd dependency be applied only to a unit's “ExecStart” action?

I have a scenario where a number of storage volumes are encrypted using keys contained on a removable encrypted USB "keyring" flash drive. I am running Arch Linux and this question is about systemd ...
4
votes
1answer
2k views

How to add a dependency to a systemd.mount that is activated by /bin/mount?

I want systemd on mount /mnt/test to automatically call a program (in real life cryptsetup to unlock the underlying device, for testing here echo) before the file system is mounted and after it is ...
4
votes
1answer
731 views

MySQL server-id not being set with Fedora 16

I am setting up a mysql slave on a Fedora 16 system, and the server_id is not being set properly. My /etc/my.cnf is: [mysqld] server-id=16 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock read-...
4
votes
1answer
1k views

how to start a systemd service before networking starts?

I'm trying to set up a new service (under Debian Jessie) that needs to set up some mounts where the network configuration is stored and thus this service must complete before networking.service starts....
4
votes
2answers
662 views

Creating a systemd script for Sybase ASE

I've been trying to set up our Sybase installation to run under systemd. The basic commands are covered here but when we control it manually we start it with the following command (startserver exits ...
4
votes
1answer
374 views

Cleaning up coredumpctl list

I'm looking for a way to remove any trace of old coredumps in coredumpctl list. At the moment it lists coredumps beginning at 2014-12-14 - I've updated software so often between then and now that I ...
4
votes
1answer
739 views

How do I run Gnome from a systemd-nspawn container in a second X server?

I'm using systemd-nspawn to "boot" a second Linux OS from a USB hard disk. I'd like to launch that OS's Gnome Desktop in a second X server running on the same machine on a different tty than the ...
4
votes
2answers
8k views

How do I configure systemd to activate an encrypted swap file?

My previous question produced the commands to add an encrypted swap file: # One-time setup: fallocate -l 4G /root/swapfile.crypt chmod 600 /root/swapfile.crypt # On every boot: loop=$(losetup -f) ...
4
votes
1answer
64 views

Can I use systemd to start and stop a service based on the presence of a file?

My config thus far is: foo.path [Path] PathExists=/tmp/foo.path [Install] WantedBy=multi.user.target foo.service [Unit] Description=Matt Test BindsTo=foo.path [Service] ExecStart=/bin/sh /...
4
votes
1answer
133 views

SystemD not running an ExecStartPre until I reload and restart the service

I am overriding the Docker SystemD start-up script to extend it with an environment file. I have defined my configuration file at /etc/systemdb/system/docker.service.d/docker.conf like so: test -d /...
4
votes
0answers
40 views

How do I run a systemd oneshot service whenever my system gets a new IPv6 address?

I would like to run a systemd oneshot service whenever my system gets a new IPv6 address assigned to it from the network router (this would be on boot, and periodically throughout its uptime). ...
4
votes
0answers
46 views

systemd: Restart units stopped by Conflicts option

I have two services A and B which run continuously, for them I use systemd service units. At specific times service C should be run, I can do this using a timer and a service with the same name. C ...
4
votes
0answers
52 views

Workaround for mount -bind behavior change between wheezy and jessie?

I recently upgraded a system from wheezy to jessie that makes use of bind mounts. But with the update the behavior of the bind mount has changed, and now acts as bind one filesystem will recursively ...
4
votes
1answer
138 views

System does not poweroff - how to diagnose

After upgrading to debian jessie my dated desktop system no longer powers off reliably (/sbin/poweroff - via systemctl on tty1). Instead, it shuts down, pauses and reboots and only powers off if I ...
4
votes
0answers
259 views

Make systemd reload only single openvpn process and not the whole group

I'm running several openvpn instances on my server with debian stable; as well some clients as a server instance. Right now, when one of these instances fails, systemd seems to kill and restart the ...
4
votes
1answer
53 views

How to distinguish if a systemd unit is run by apt-get or during boot?

Can one somehow distinguish if, a) the daemon was started during boot or, b) (re)started by an apt-get install or upgrade? Can this be distinguished from within the daemon itself? The use case is ...
4
votes
0answers
225 views

Is there a way to develop upstart scripts on fedora 21?

I'm working on creating upstart scripts for an internal service I'm working on. I realize systemd has triumphed over upstart, but our company already has an investment in upstart and I'm just tacking ...
4
votes
1answer
492 views

Execute code on shutdown on Fedora 19

I need to catch any OS shut down and execute some actions before letting the OS be shutted down. I'm using Fedora 19 and C++. I'm able to catch a shutdown signal given by the console with the ...
4
votes
2answers
5k views

launch x11vnc on bootup

I am using archlinux version 3.10.27-1-ARCH on my remote PC and I would like it to launch x11vnc server on successful bootup. Though i can start the x11vnc server manually, I am having trouble ...
4
votes
2answers
5k views

“A stop job is running…” on shutdown

Almost every time when I'm shutting down or rebooting the system I get the following message before the system actually shuts down: A stop job is running for Session 1 of user xy It waits for 1:...
3
votes
1answer
3k views

Systemd kills service immediately after start

I'm writing systemd unit file for OSSEC HIDS. Problem is that when systemd starts service it immediately stops them. When I use that ExecStart directive all working fine. ExecStart=/var/ossec/bin/...
3
votes
4answers
3k views

What's the best way to have uwsgi create a '/run/uwsgi' folder on reboot?

I have set up a Django project to run with uwsgi and nginx and it's all running as expected, except that when I reboot uwsgi will not launch correctly until the /run/ folder is recreated on the fs. /...
3
votes
3answers
71 views

Shutdown procedure clarification

The book "How Linux Works" says the general shutdown procedure (independent of init system) is something like this: init asks every process to shut down cleanly. If a process doesn’t respond after a ...
3
votes
2answers
199 views

/usr/bin/mail call in ExecStart not sending any mail

I have the following service configured: [Unit] Description=SCollector After=NetworkManager.service [Service] Type=simple ExecStart=/bin/sh -c "/opt/scollector/scollector /opt/scollector/...
3
votes
2answers
327 views

How to stop all units belonging to the same target?

I'm wondering how to stop all units that are grouped together by the same target. My setup is as follows. I have several unit config files that read: [Unit] ... [Service] ... [Install] WantedBy=...
3
votes
3answers
182 views

How do you set ReadOnlyDirectories with systemd-run?

I'm trying to prevent Juniper Network Connect (a vpn client) from modifying /etc/resovl.conf, which I hoped to do with systemd-run. I tried: systemd-run --property=ReadOnlyDirectories=/etc ./ncsvc -h ...
3
votes
1answer
1k views

Stable server distribution without systemd (for OpenVZ)?

I don't want this to become a "my distribution is better" flamewar so please read the whole question and only answer if you know a distribution that fulfils all requirements. The situation is the ...
3
votes
2answers
3k views

Writing own daemon. systemd error: Failed to read PID from file: Invalid argument

I'm trying to write own daemon a la very simple MPD (it's operating systems laboratory work). I made it work: it starts like a daemon (output of ps): 1 14877 14877 14877 ? -1 Ss 0 0:...
3
votes
5answers
10k views

Apache won't start on Fedora 15

I can't get Apache to start on Fedora 15. I downloaded a project into /var/www/html and changed myself to the owner (recursively), though I don't think I changed any SELinux contexts or anything like ...
3
votes
3answers
722 views

journalctl: how to prevent text from truncating in terminal

How can I keep long strings from truncating in terminal? For example if I run journalctl -xn There's a lot of text that I cannot read. I am open to using other programs/tools.
3
votes
1answer
2k views

systemd waiting too long for network at Debian 8.0 Jessie's boot

My system has booted up relatively fast while run Debian 7 Wheezy, but after upgrade to Debian 8 Jessie, and therefore SysVinit to systemd, it became a way, way slower. The thing, slowing down the ...
3
votes
1answer
341 views

Can systemd do some setup before forking as a user?

Having written several small daemons or web applications for my personal use, I like to manage them using systemd (I am using Arch Linux, if that matters). So I write service files like the one below: ...
3
votes
1answer
232 views

Debian-Jessie: How do you check iptables status?

In old sysvinit I would just do service iptables status and see if it was running or not. But in newer Debian-Jessie I grep for iptables in the list of services and don't see iptables listed anywhere....
3
votes
2answers
59 views

How to split FHS read-only and read/write directories across two disks with Linux/systemd, without partitioning the raed/write disk?

My objective is to have the physical storage for the Linux FHS read/write directories (/home, /srv, /tmp, /var) on a separate (logical or physical) disk from the potentially read-only rest of the root ...
3
votes
2answers
141 views

Running a systemd service unit at next boot, but not subsequent boots

I have a script that I want to run during my next system boot, but not on subsequent boots. I want to use systemd to launch it, so I created a service file at /usr/lib/systemd/system/myscript.service: ...
3
votes
1answer
932 views

How to write a systemd service unit file so it waits until a specific interface is up before starting?

I am trying to write a unit file for hostapd on Debian. The hostapd daemon seems to need the interface for the associated Wifi interface to be up before it is run or else it SEGV's. I've tried ...
3
votes
2answers
9k views

Systemd fails to start Nginx on reboot, but it works manually

Here's my situation whenever I reboot: $ systemctl --failed UNIT LOAD ACTIVE SUB DESCRIPTION nginx.service loaded failed failed A high performance web server and a reverse proxy server ....
3
votes
2answers
3k views

dhcpcd can't startup at boot

when I run dhcpcd after boot everything works fine but when I try to add it to auto start systemctl enable dhcpcd@eth0.service, after each boot it's inactive dhcpcd@eth0.service loaded ...
3
votes
3answers
351 views

Creating one-time cgroup

I would like to be able to create a one-time temporary group in hierarchy. For example: #!/bin/sh run_with_csubgroup /sys/fs/cgroup/group/subgroup/ Which creates group say /sys/fs/cgroup/group/...
3
votes
1answer
427 views

Debian won't shut down (Failed to start poweroff.target: Transaction is destructive)

I stumbled upon a weird behaviour of my BunsenLabs GNU/Linux. Sometimes I cannot turn off the OS. I doesn't matter whether I use sudo poweroff or the GUI approach. This is what I get after running ...
3
votes
1answer
543 views

Where to find the logs of the services started by systemd at computer boot?

I am running a Debian unstable with systemd, at boot I have a few services which are marked as FAILED (and not OK), but the log is too fast for me to grab the name of the failed service. I wonder if ...