From b0569ab91685d4cde15d83015b1f2ca9e90fb2d0 Mon Sep 17 00:00:00 2001 From: Jordi Date: Fri, 13 Jan 2017 12:56:37 +0100 Subject: [PATCH] Add example systemd service and tmpfile.d files. --- Makefile.am | 1 + configure.ac | 2 ++ extras/Makefile.am | 2 ++ extras/systemd/Makefile.am | 3 +++ extras/systemd/tinyproxy.service | 13 +++++++++++++ extras/systemd/tinyproxy.tmpfile | 1 + 6 files changed, 22 insertions(+) create mode 100644 extras/Makefile.am create mode 100644 extras/systemd/Makefile.am create mode 100644 extras/systemd/tinyproxy.service create mode 100644 extras/systemd/tinyproxy.tmpfile diff --git a/Makefile.am b/Makefile.am index 9d62d2c..e5df02f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS = \ src \ data \ etc \ + extras \ docs \ m4macros \ tests diff --git a/configure.ac b/configure.ac index 3990c2f..2800937 100644 --- a/configure.ac +++ b/configure.ac @@ -273,6 +273,8 @@ src/Makefile data/Makefile data/templates/Makefile etc/Makefile +extras/Makefile +extras/systemd/Makefile docs/Makefile docs/man5/Makefile docs/man5/tinyproxy.conf.txt diff --git a/extras/Makefile.am b/extras/Makefile.am new file mode 100644 index 0000000..dba8ff8 --- /dev/null +++ b/extras/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = \ + systemd diff --git a/extras/systemd/Makefile.am b/extras/systemd/Makefile.am new file mode 100644 index 0000000..939d6d3 --- /dev/null +++ b/extras/systemd/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = \ + tinyproxy.service \ + tinyproxy.tmpfile diff --git a/extras/systemd/tinyproxy.service b/extras/systemd/tinyproxy.service new file mode 100644 index 0000000..301f899 --- /dev/null +++ b/extras/systemd/tinyproxy.service @@ -0,0 +1,13 @@ +[Unit] +Description=Tinyproxy lightweight HTTP Proxy +After=network.target +Documentation=man:tinyproxy(8) man:tinyproxy.conf(5) + +[Service] +Type=forking +ExecStart=/usr/sbin/tinyproxy +PIDFile=/run/tinyproxy/tinyproxy.pid +PrivateDevices=yes + +[Install] +WantedBy=multi-user.target diff --git a/extras/systemd/tinyproxy.tmpfile b/extras/systemd/tinyproxy.tmpfile new file mode 100644 index 0000000..b2b7c93 --- /dev/null +++ b/extras/systemd/tinyproxy.tmpfile @@ -0,0 +1 @@ +D /run/tinyproxy 0750 nobody nogroup -