Scroll to navigation

man(8) pkgos-gen-systemd-unit man page man(8)

NAME

pkgos-gen-systemd-unit - generate the systemd unit.

SYNOPSIS

pkgos-gen-systemd-unit <init_template>

DESCRIPTION

pkgos-gen-systemd-unit generates the systemd unit from the init template. It is normally called from the gen-init-configurations target of pkgos.make, once for each debian/*.init.in file.

The generated unit has these fixed directives: WorkingDirectory=~, RuntimeDirectory=<PROJECT_NAME> lock/<PROJECT_NAME>, CacheDirectory=<PROJECT_NAME>, ExecStart=/etc/init.d/<NAME> systemd-start, LimitNOFILE=65535, and WantedBy=multi-user.target. The below variables, set in the .init.in file, customize the rest of it.

The Type= directive, which defaults to simple. Use notify when the daemon sends its ready notification with sd_notify(3), or oneshot for a unit which just runs a script and exits (Restart= is then set to no, while all of the other unit types get Restart=on-failure).
The NotifyAccess= directive. Unset by default, meaning that only the main process may notify. Set it to all when child processes also send the ready notification.
The TimeoutStartSec= directive. Unset by default.
The TimeoutStopSec= directive. Defaults to 15 seconds.
SYSTEM_GROUP The User= and Group= directives, which default to PROJECT_NAME.
The Documentation= directive, which defaults to man:<NAME>(1).
An Alias= directive in the [Install] section, adding an extra name for the unit.
Extra directives, verbatim, in the [Unit] section. It can hold several directives at once.
Extra directives, verbatim, in the [Service] section.

The LSB headers of the .init.in file are also translated into the unit: the services listed in the # Should-Start: and # Required-Start: headers become After= and Wants= directives, each entry being suffixed by network-online.target, local-fs.target and remote-fs.target), and the services listed in the # X-Start-Before: header become a Before= directive.

OPTIONS

The pkgos-gen-systemd-unit does not take any options.

BUGS

No known bugs.

AUTHOR

Script is written by Thomas Goirand <zigo@debian.org>

27 Apr 2016 45.0