summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIanDury2017-02-18 13:33:26 +0100
committerIanDury2017-02-18 13:33:26 +0100
commit4e350a624a0c700f13c3f6d5518b8f3b4d809a4f (patch)
treec6032990c6b1e99baf8ba4b408019679ec83a219
parent053144bec29e24ffff789874fb5288d75d555050 (diff)
downloadaur-4e350a624a0c700f13c3f6d5518b8f3b4d809a4f.tar.gz
Add /var/run handling to service
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--domoticz.service6
3 files changed, 7 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2a545718897..9df6dfb23da 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -22,7 +22,7 @@ pkgbase = domoticz-git
source = git+https://github.com/domoticz/domoticz.git
source = domoticz.service
sha256sums = SKIP
- sha256sums = 8627b3a82db83a0d94c830c007c09ffd38366505fced9c724a7c29414837f3ad
+ sha256sums = f45f382e5ae0d54f1b1f147b89f5ac5f62719c83a8eb280e20121f8dfc7b2697
pkgname = domoticz-git
diff --git a/PKGBUILD b/PKGBUILD
index d2a2f47fd66..8410cbe6acc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,7 +15,7 @@ install='domoticz-git.install'
source=('git+https://github.com/domoticz/domoticz.git'
'domoticz.service')
sha256sums=('SKIP'
- '8627b3a82db83a0d94c830c007c09ffd38366505fced9c724a7c29414837f3ad')
+ 'f45f382e5ae0d54f1b1f147b89f5ac5f62719c83a8eb280e20121f8dfc7b2697')
pkgver() {
cd $_gitname
diff --git a/domoticz.service b/domoticz.service
index 38447b18da5..c58c3e29fe0 100644
--- a/domoticz.service
+++ b/domoticz.service
@@ -4,7 +4,11 @@ After=network.target
[Service]
User=http
-ExecStart=/opt/domoticz/domoticz -www 8080 -daemon
+Group=http
+PermissionsStartOnly=true
+ExecStartPre=/usr/bin/install -d -m 0700 -o http -g http /var/run/domoticz
+ExecStart=/opt/domoticz/domoticz -www 8080 -pidfile /var/run/domoticz/domoticz.pid -daemon
+PIDFile=/var/run/domoticz/domoticz.pid
WorkingDirectory=/opt/domoticz
RestartSec=5
Restart=on-failure