Sample Header Ad - 728x90

Runtime parameters for a systemd service

3 votes
1 answer
20675 views
I am a little confused about how runtime parameters are normally supplied to a systemd service. The general idea I have is that the following happens: There is a file that contains the environment variable settings, e.g., /etc/sysconfig/mydaemon Then there is the unit file, e.g., mydaemon.service (not sure where this is located) Inside of the unit file is a line such as the following: EnvironmentFile=-/etc/sysconfig/mydaemon When the service is started, the settings file is opened then each setting is supplied to main as argc/argv. Is that right?
Asked by Tyler Durden (6193 rep)
Sep 17, 2014, 08:23 PM
Last activity: Feb 10, 2021, 05:20 PM