Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #7 from falconindy/systemd

add systemd unit files for installation
  • Loading branch information...
commit a7e3d397bad337d59519fa69eafee7ca1d83d551 2 parents 7f583a0 + a9784d8
Grzegorz Nosek gnosek authored
5 Makefile.in
@@ -9,6 +9,11 @@ install: all
9 9 install -m 755 fcgiwrap $(targetdir)
10 10 install -d -m 755 $(man8dir)
11 11 install -m 644 fcgiwrap.8 $(man8dir)
  12 +ifneq ("@systemdsystemunitdir@", "")
  13 + install -d -m 755 $(DESTDIR)@systemdsystemunitdir@
  14 + install -m 644 systemd/fcgiwrap.socket $(DESTDIR)@systemdsystemunitdir@
  15 + install -m 644 systemd/fcgiwrap.service $(DESTDIR)@systemdsystemunitdir@
  16 +endif
12 17
13 18 fcgiwrap: fcgiwrap.c
14 19 @CC@ @AM_CFLAGS@ fcgiwrap.c -o fcgiwrap -lfcgi @systemd_LIBS@ @LDFLAGS@
8 configure.ac
@@ -38,6 +38,14 @@ if test "x$with_systemd" != "xno"; then
38 38 fi
39 39 AM_CONDITIONAL(HAVE_LIBSSL, [test "x$have_systemd" = "xyes"])
40 40
  41 +AC_ARG_WITH([systemdsystemunitdir],
  42 + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
  43 + [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
  44 +if test "x$with_systemdsystemunitdir" != xno -a "x$have_systemd" != xno; then
  45 + AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
  46 +fi
  47 +AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
  48 +
41 49 # Checks for header files.
42 50 AC_CHECK_HEADERS([fcntl.h],, [AC_MSG_ERROR([fcntl.h header missing])])
43 51 AC_CHECK_HEADERS([limits.h stdlib.h string.h unistd.h],, [AC_MSG_ERROR([at least one important system header file is missing])])
11 systemd/fcgiwrap.service
... ... @@ -0,0 +1,11 @@
  1 +[Unit]
  2 +Description=Simple CGI Server
  3 +After=nss-user-lookup.target
  4 +
  5 +[Service]
  6 +ExecStart=/usr/sbin/fcgiwrap
  7 +User=http
  8 +Group=http
  9 +
  10 +[Install]
  11 +Also=fcgiwrap.socket
8 systemd/fcgiwrap.socket
... ... @@ -0,0 +1,8 @@
  1 +[Unit]
  2 +Description=fcgiwrap Socket
  3 +
  4 +[Socket]
  5 +ListenStream=/run/fcgiwrap.sock
  6 +
  7 +[Install]
  8 +WantedBy=sockets.target

0 comments on commit a7e3d39

Please sign in to comment.
Something went wrong with that request. Please try again.