1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# -*- systemd -*-
#
# Copyright © 2019-2020 Teddy Hogeborn
# Copyright © 2019-2020 Björn Påhlsson
#
# This file is part of Mandos.
#
# Mandos is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mandos is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mandos. If not, see <http://www.gnu.org/licenses/>.
#
# Contact the authors at <mandos@recompile.se>.
#
# This systemd.service(5) unit file will start the Mandos
# password-agent(8mandos) program, which will in turn run
# mandos-client(8mandos) to get a password and send the password to
# any and all active password questions using the systemd “Password
# Agent” mechanism.
# This file should be installed in the root file system as
# "/usr/lib/dracut/modules.d/90mandos/ask-password-mandos.service" and
# will be installed in the initramfs image file as
# "/lib/systemd/system/ask-password-mandos.service" by dracut when
# dracut creates the initramfs image file.
[Unit]
Description=Forward Password Requests to remote Mandos server
Documentation=man:intro(8mandos) man:password-agent(8mandos) man:mandos-client(8mandos)
DefaultDependencies=no
Conflicts=shutdown.target
Before=shutdown.target
ConditionKernelCommandLine=!mandos=off
ConditionFileIsExecutable=/lib/mandos/password-agent
ConditionFileIsExecutable=/lib/mandos/mandos-client
ConditionFileNotEmpty=/etc/mandos/keys/pubkey.txt
ConditionFileNotEmpty=/etc/mandos/keys/seckey.txt
ConditionFileNotEmpty=/etc/mandos/keys/tls-pubkey.pem
ConditionFileNotEmpty=/etc/mandos/keys/tls-privkey.pem
ConditionPathIsMountPoint=!/sysroot
[Service]
ExecStart=/lib/mandos/password-agent $PASSWORD_AGENT_OPTIONS -- /lib/mandos/mandos-client --pubkey=/etc/mandos/keys/pubkey.txt --seckey=/etc/mandos/keys/seckey.txt --tls-pubkey=/etc/mandos/keys/tls-pubkey.pem --tls-privkey=/etc/mandos/keys/tls-privkey.pem $MANDOS_CLIENT_OPTIONS
|