aboutsummaryrefslogtreecommitdiffstats
path: root/lacme
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-08-04 00:00:58 +0200
committerGuilhem Moulin <guilhem@fripost.org>2020-08-04 01:39:35 +0200
commitda8b727f156d23553eecb90e8731d39c6027cb02 (patch)
tree929930ef53d3bacf9e472bceb441a3cdec150b83 /lacme
parentd9946b9ab478026defed364485d970b4041e1a2a (diff)
Makefile: Use variables for target directories etc.
Diffstat (limited to 'lacme')
-rwxr-xr-xlacme14
1 files changed, 7 insertions, 7 deletions
diff --git a/lacme b/lacme
index 73180f0..566545b 100755
--- a/lacme
+++ b/lacme
@@ -75,7 +75,7 @@ sub set_FD_CLOEXEC($$);
my $CONFFILENAME = $OPTS{config} // first { -f $_ }
( "./$NAME.conf"
, ($ENV{XDG_CONFIG_HOME} // "$ENV{HOME}/.config")."/lacme/$NAME.conf"
- , "/etc/lacme/$NAME.conf"
+ , "@@sysconfdir@@/lacme/$NAME.conf"
);
do {
die "Error: Can't find configuration file\n" unless defined $CONFFILENAME;
@@ -93,24 +93,24 @@ do {
socket => (defined $ENV{XDG_RUNTIME_DIR} ? "$ENV{XDG_RUNTIME_DIR}/S.lacme" : undef),
user => 'nobody',
group => 'nogroup',
- command => '/usr/libexec/lacme/client',
+ command => '@@libexecdir@@/lacme/client',
# the rest is for the ACME client
map {$_ => undef} qw/server timeout SSL_verify SSL_version SSL_cipher_list/
},
webserver => {
- listen => '/run/lacme-www.socket',
+ listen => '@@runstatedir@@/lacme-www.socket',
'challenge-directory' => undef,
user => 'www-data',
group => 'www-data',
- command => '/usr/libexec/lacme/webserver',
+ command => '@@libexecdir@@/lacme/webserver',
iptables => 'No'
},
accountd => {
user => '',
group => '',
- command => '/usr/bin/lacme-accountd',
- config => '/etc/lacme/lacme-accountd.conf',
+ command => '@@bindir@@/lacme-accountd',
+ config => '@@sysconfdir@@/lacme/lacme-accountd.conf',
privkey => undef,
quiet => 'Yes',
}
@@ -743,7 +743,7 @@ elsif ($COMMAND eq 'newOrder' or $COMMAND eq 'new-cert') {
};
# verify certificate validity against the CA
- $conf->{CAfile} //= '/usr/share/lacme/lets-encrypt-x3-cross-signed.pem';
+ $conf->{CAfile} //= '@@datadir@@/lacme/lets-encrypt-x3-cross-signed.pem';
if ($conf->{CAfile} ne '' and spawn({in => $x509}, 'openssl', 'verify', '-CAfile', $conf->{CAfile},
qw/-purpose sslserver -x509_strict/)) {
print STDERR "[$s] Error: Received invalid X.509 certificate from ACME server!\n";