summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-25 21:17:00 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-25 21:17:00 -0700
commit87f149aaef138f2399d02688d61d0534b5650f8e (patch)
treebf4442a9e56d9dac8cf5cbbdbc7d3fe07b08777f
parentc301c0fa0e6b409e1682a0dc75ae50b34e56457c (diff)
downloades-public-proxy-87f149aaef138f2399d02688d61d0534b5650f8e.tar.gz
es-public-proxy-87f149aaef138f2399d02688d61d0534b5650f8e.zip
include systemd unit file in debian package
-rw-r--r--Cargo.toml4
-rw-r--r--extra/es-public-proxy.service12
2 files changed, 16 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index cc3fa5b..c992506 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,8 +31,12 @@ maintainer = "Bryan Newbold <bnewbold@robocracy.org>"
depends = "$auto"
section = "utility"
priority = "optional"
+maintainer-scripts = "extra/"
+systemd-units = { enable = false }
+extended-description = "TODO: longer description of package should go here"
assets = [
["target/release/es-public-proxy", "usr/bin/", "755"],
["extra/es-public-proxy.1", "usr/share/man/man1/", "644"],
["extra/example_config.toml", "usr/share/doc/es-public-proxy/", "644"],
+ ["extra/example_config.toml", "etc/es-public-proxy.toml", "644"],
]
diff --git a/extra/es-public-proxy.service b/extra/es-public-proxy.service
new file mode 100644
index 0000000..256212f
--- /dev/null
+++ b/extra/es-public-proxy.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Public-facing Elasticsearch Proxy
+After=network.target
+
+[Service]
+Environment="RUST_LOG=es_public_proxy=warn"
+ExecStart=/usr/bin/es-public-proxy --config /etc/es-public-proxy.toml
+User=nobody
+Type=simple
+
+[Install]
+WantedBy=multi-user.target