summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Voropaev2018-01-16 08:46:37 +0300
committerRoman Voropaev2018-01-16 08:46:37 +0300
commita9e22ed26e9d1aa5bad3286948b3c70a466b1ee8 (patch)
tree4aba483b5cf865333abd560ee6239ba3cb25f13d
parent9ffc950aa437f73cba86ea2972b4c61bc85f8262 (diff)
downloadaur-a9e22ed26e9d1aa5bad3286948b3c70a466b1ee8.tar.gz
Systemd service added
-rw-r--r--PKGBUILD1
-rw-r--r--unit.service13
2 files changed, 14 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cb3fef5b13d..15ee084d548 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,6 +24,7 @@ build() {
package_nginx-unitd() {
cd "$srcdir"/$_shortname-$pkgver
make DESTDIR="$pkgdir" unitd-install
+ install -m 644 -D "$startdir"/unit.service "$pkgdir"/usr/lib/systemd/system/unit.service
}
package_nginx-unit-python() {
diff --git a/unit.service b/unit.service
new file mode 100644
index 00000000000..e7f1e1c5a3a
--- /dev/null
+++ b/unit.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=NGINX Unit
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=forking
+PIDFile=/run/unit.pid
+ExecStart=/usr/sbin/unitd --control unix:/run/control.unit.sock --log /var/log/unit.log --pid /run/unit.pid
+ExecReload=
+
+[Install]
+WantedBy=multi-user.target