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
50 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
7k views

rsyslog not logging

This is an odd issue. I was testing the chrony/ntp services on a RHEL7 VM and was resetting its time as well as the host's. Once I was satisfied with it I checked /var/log/messages and realized it ...
4
votes
1answer
327 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
1answer
239 views

How to start to use httpd with socket activation (systemd)?

The apache httpd server is seldom needed on one of our small servers, so it would be nice to start it via socket activation by systemd (and later stopped it when no traffic occurred for some time). Is ...
4
votes
0answers
1k views

Enable systemd-baclight@intel_backlight instead of systemd-backlight@acpi_video0

I have 2 files in /sys/class/backlight/ - acpi_video0 and intel_backlight. intel_backlight is the one which controls my screen brightness (echo/cat), however acpi_video0 is the default. By default ...
4
votes
2answers
4k 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 ...
3
votes
1answer
5k views

How can I start a systemd service only after mysql has started?

I am working on a project which is a mono EmailServer. I have tried adding a service to the systemd so that it starts up automatically during boot but I am having a problem. I have created the ...
3
votes
1answer
3k views

systemd timer every 15 minutes

I'm trying to make a systemd timer that runs every 15 minutes. Right now I have: timer-fifteen.timer: [Unit] Description=15min timer [Timer] OnBootSec=0min OnCalendar=*:*:0,15,30,45 ...
3
votes
3answers
7k views

Arch Linux run script a minute after boot

I have set up a bridge between eth0 and wlan0 with netctl. It works fine if I tell it to configure eth0 and wlan0 at startup and then for me to manually start the bridge after it boots. If I tell the ...
3
votes
3answers
181 views

if I upgrade from Debian Wheezy (7.x) to Jessie (8.x), will systemd run by default?

I am wary of systemd for various reasons which are irrelevant to this question. Now, I'm about to upgrade my Debian Wheezy to Debian Jessie. Will systemd be used by default after an apt-get ...
3
votes
2answers
1k views

start nginx on boot with systemd

I just installed nginx 1.9 on a debian 8 server. nginx is working fine, when I tell it to run, but it wont seem to load nginx automaticaly on boot. I have tried numerious init scripts recomended on ...
3
votes
1answer
569 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
4answers
3k views

Why is my Debian jessie always in runlevel 5?

I have configured the lines in /etc/inittab as follows: # The default runlevel. id:2:initdefault: But after logging in the output of runlevel is as follows: N 5 So why am I in runlevel 5 ...
3
votes
2answers
1k views

What is systemd's target, service and socket?

I know that all of them are unit files, but I can't understand the special meaning of them. I think that targets are similar to daemons and sockets are the same as socket (IP + port) but also with ...
3
votes
2answers
2k 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 ...
3
votes
2answers
5k views

Log every command typed in any shell: output (from logger function to syslog-ng/journald) contains duplicate entries for commands?

I installed syslog-ng to use on my desktop (Gentoo 64bit, upgraded to systemd i.e. was OpenRC before, with Openbox and Slim only) with my normal user to log all commands I type in the shell (bash ...
3
votes
2answers
101 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
620 views

How to disable systemd's “Time has been changed” message spam in /var/log/syslog on Debian jessie?

Due to combined use of Debian jessie, that uses systemd by default, and sdwdate (that uses Slow Clock Adjuster ( gh )), my system clock is frequently changed. As a result /var/log/syslog gets ...
3
votes
1answer
146 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
2answers
95 views

Run top instead of getty

Here's a simple question. I'm not sure the answer is very simple, but anyway. By default, systemd auto-launches getty on each VT except VT7. What I would like is for systemd to launch top on VT6 ...
3
votes
3answers
299 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 ...
3
votes
1answer
42 views

Can socat be started directly by systemd?

The following socat command-line works as expected when entered at a shell prompt: # /usr/bin/socat UDP-RECV:4321 STDOUT It listens on UDP port 4321 and writes everything received to standard ...
3
votes
1answer
37 views

How to tell systemd to stop service when it no longer required/wanted

I have 10 TF2 game dedicated servers, they started manually one by one with individual service files tf2-server-1.service ... tf2-server-10.service And they want service hlstatsx ...
3
votes
1answer
38 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] ...
3
votes
1answer
107 views

How to make a Systemd service run forever (“Bootup is not yet finished. Please try again later.”)

I have created a systemd service that has to run forever (because it does the main job on my embedded computer): # /etc/systemd/system/samplerbox.service ######################################## ...
3
votes
3answers
94 views

Only allow process to run between hours x and y

I use a mobile data connection service. I only have unrestricted bandwidth between 9am and 4pm. I wonder how I can "silence" applications such as the Dropbox applet outside that schedule. I thought ...
3
votes
1answer
42 views

Run an arbitrary command when a service fails

I want to run some script when a service fails. The closest thing I see to this is the FailureAction= option (under [Service] section), but it only offers reboot commands.
3
votes
1answer
266 views

Can I use a symbolic link as a service of systemd?

For instance, I have a service named mysshd.service under /usr/lib/systemd/system/ directory. Can I create a symbolic link such as: ln -s /usr/lib/systemd/system/mysshd.service ...
3
votes
1answer
1k views

Cannot get Systemd working on GENTOO: Where am i going wrong?

I'm having a massive amount of trouble installing gentoo with systemd; this is a fresh install and not an upgrade. Steps (after partitions etc.. are setup): Unpack AMD64 stage3 and emerge-webrsync ...
3
votes
2answers
5k 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
3answers
15 views

finding systemd unit 'owning' a running daemon process

To debug a JACK/Pulseaudio issue, I want to understand when and why the pulseaudio daemon is started by systemd (on Fedora). Using $ ps -o'pid,ppid,args' `pgrep pulse` is see that the pulseaudio ...
3
votes
1answer
29 views

systemd support for toggling mutually exclusive services?

I have two versions of a service that I occasionally want to switch between - my-service-a and my-service-b. I want my-service-a to always be the one which is running when the system is booted. ...
3
votes
1answer
160 views

Prevent systemd from writing to syslog each time it starts the same service

I have a service that runs every 30 seconds. The systemd timer file for this service is as below: ~# cat /etc/systemd/system/speed_check.timer [Unit] Description="Check device speed" [Timer] ...
3
votes
1answer
139 views

How to implement policy conform systemd custom actions on Debian?

What do I mean by custom actions? Here are some examples. sudo service apache2 stop-htcacheclean sudo service apache2 graceful-stop sudo service apache2 start-htcacheclean sudo service apparmor ...
3
votes
1answer
482 views

Output of a python script running as unit is out of order while shells seems unnafected

How would I get all outputs of systemd managed python2 script instantly into journal, just like it appears in terminal I'm on centos 7, but seems to be same on arch according to systemd manual, ...
3
votes
1answer
7k views

service command does not work in centos 7

I used to use service command for restarting, reloading, and checking status of service on centos 6.5 like below: $ sudo service nginx restart OK $ sudo service nginx status ...
3
votes
1answer
2k views

PID file /var/run/named/named.pid not readable (yet?) after start [duplicate]

Feb 24 15:54:34 ns1 named[20308]: all zones loaded Feb 24 15:54:34 ns1 named[20308]: running Feb 24 15:54:34 ns1 systemd[1]: PID file /var/run/named/named.pid not readable (yet?) after start. Feb 24 ...
3
votes
1answer
662 views

Is there any reason to move away from fstab on a systemd system?

I'm on an Arch Linux system, which means systemd. In systemd there are native unit files for mountpoints, with the extension .mount. I've always just used /etc/fstab, which never gave me problems ...
3
votes
1answer
476 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 ...
3
votes
1answer
150 views

Why to add parentheses into a process name?

On my machine (Debian testing), when I do ps aux | grep pam I obtain orto 609 0.0 0.0 58532 2148 ? S 08:06 0:00 (sd-pam) orto 5533 0.0 0.0 12724 1948 pts/1 ...
3
votes
1answer
57 views

systemd service can't access user home

I am trying to setup a systemd service on Ubuntu 15.04 (and Debian 8). I have a program /home/testuser/server/prrserver. My systemd service is configured to run prrserver as testuser:testuser. What ...
3
votes
2answers
304 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 ...
3
votes
1answer
4k views

Why does my systemd unit fail to run on server reboot?

I'm having troubles getting a systemd service unit file to run correctly when the server reboots. This server is a fresh CentOS 7.0.1406 install. I'm trying to set it up with multiple Apache httpd ...
3
votes
2answers
322 views

Systemd: locking the console

I have a laptop that runs Debian Jessie with only the Linux console - no X server installed. A recent dist-upgrade replaced sysvinit with systemd. Now I'm trying to get systemd to lock the console ...
3
votes
2answers
1k views

command not running in cron (systemctl suspend)

I have this cronjob set : * * * * * /usr/bin/systemctl suspend And it is not working. But I can run it in a shell and it works. I don't understand what could be not working. EDIT Redirecting error ...
3
votes
1answer
276 views

How to troubleshoot systemd's “contradicts existing jobs” error message

Looking through my system logs, I see the following message in /var/log/messages: Sep 2 15:29:15 <myhostname> systemd[1]: Requested transaction contradicts existing jobs: File exists So, my ...
3
votes
2answers
5k 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) ...
3
votes
1answer
337 views

Run backup on HD plugged with systemd

When I plug a HD via USB, it should a) mount it b) run my backup script. What I currently have is backintime.service [Unit] Description="Runs backintime to backup." [Service] User=user ...
3
votes
1answer
849 views

dropboxd hangs at `Connecting…` when started trough systemd on boot

I've got a systemd service file dropbox.service set up as follows: [Unit] Description=dropbox After=local-fs.target network.target [Service] User=romeovs ExecStart=/usr/bin/dropboxd [Install] ...
3
votes
2answers
130 views

How to permanently disable root-password prompt for recovery mode, RHEL7

Note: I asked a similar quesiton concerning version 6 of these bundles here. Note that 7 uses systemd and may have a different implementation In the rare cases that a RHEL or CentOS 7 system is ...