Skip to content

Commit

Permalink
Rework gtlsshd.service
Browse files Browse the repository at this point in the history
It has a reference to where gtlsshd is installed, so do a substitution
for it.  Unfortunately, autoconf's substitution won't work, so we have
to do it ourselves.

Signed-off-by: Corey Minyard <[email protected]>
  • Loading branch information
cminyard committed Jul 6, 2023
1 parent 5c54ac5 commit e5a324d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions tools/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ EXTRA_PROGRAMS = gtlsshd gtlssh gmdns gtlssh-keygen gensio_pty_helper
bin_SCRIPTS = @GTLSSYNC@ greflector
EXTRA_SCRIPTS = gtlssync

noinst_DATA = gtlsshd.service

greflector: $(top_builddir)/tests/reflector.py
cp $(top_builddir)/tests/reflector.py $@

Expand Down Expand Up @@ -49,6 +51,9 @@ gtlsshd_LDADD = libgtlssh.a libgensiotool.a $(top_builddir)/lib/libgensioosh.la\
$(top_builddir)/lib/libgensio.la \
@PAMLIB@ @OPENSSL_LIBS@

gtlsshd.service: ${srcdir}/gtlsshd.service.in
sed "s%@gtlsshdbindir@%${sbindir}%" $< >$@

gsound_SOURCES = gensiosound.c
gsound_LDADD = $(top_builddir)/lib/libgensioosh.la \
$(top_builddir)/lib/libgensio.la libgensiotool.a
Expand All @@ -64,7 +69,7 @@ man1_MANS = gensiot.1 @GTLSSHMAN@ @GTLSSH_KEYGENMAN@ @GTLSSYNCMAN@ @GMDNSMAN@ \
man8_MANS = @GTLSSHDMAN@
endif

EXTRA_DIST = $(manpages) gtlssync
EXTRA_DIST = $(manpages) gtlssync gtlsshd.service.in

clean-local:
rm -f gtlssh-keygen greflector
rm -f gtlssh-keygen greflector gtlsshd.service
2 changes: 1 addition & 1 deletion tools/gtlsshd.service → tools/gtlsshd.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Documentation=man:gtlsshd(8)

[Service]
Type=simple
ExecStart=/usr/local/sbin/gtlsshd --nodaemon
ExecStart=@gtlsshdbindir@/gtlsshd --nodaemon
StandardOutput=null
Restart=on-failure

Expand Down

0 comments on commit e5a324d

Please sign in to comment.