summaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'systemd')
-rw-r--r--systemd/CMakeLists.txt32
-rw-r--r--systemd/cynara-admin.socket.in2
-rw-r--r--systemd/cynara-check.socket.in2
-rw-r--r--systemd/cynara.service11
4 files changed, 22 insertions, 25 deletions
diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt
index f8116a2..3fde22f 100644
--- a/systemd/CMakeLists.txt
+++ b/systemd/CMakeLists.txt
@@ -1,25 +1,23 @@
-# Copyright (c) 2014-2016 Samsung Electronics Co., Ltd All Rights Reserved
+###########################################################################
+# Copyright (C) 2018 "IoT.bzh"
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# author: José Bollo <jose.bollo@iot.bzh>
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# @file CMakeLists.txt
-# @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
+# http://www.apache.org/licenses/LICENSE-2.0
#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
-SET(CYNARA_ADMIN_SOCKET_GROUP
- "security_fw"
- CACHE STRING
- "Group to apply on administrative sockets")
+set(SYSTEMD_UNIT_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/systemd/system"
+ CACHE PATH "Path to systemd system unit files")
CONFIGURE_FILE(cynara-admin.socket.in cynara-admin.socket @ONLY)
CONFIGURE_FILE(cynara-check.socket.in cynara-check.socket @ONLY)
diff --git a/systemd/cynara-admin.socket.in b/systemd/cynara-admin.socket.in
index ebc59c6..25c3b2c 100644
--- a/systemd/cynara-admin.socket.in
+++ b/systemd/cynara-admin.socket.in
@@ -1,6 +1,6 @@
[Socket]
FileDescriptorName=admin
-ListenStream=@SOCKET_DIR@/cynara.admin
+ListenStream=@DEFAULT_SOCKET_DIR@/cynara.admin
SocketMode=0600
SmackLabelIPIn=@
SmackLabelIPOut=@
diff --git a/systemd/cynara-check.socket.in b/systemd/cynara-check.socket.in
index 1139d2f..b0606e0 100644
--- a/systemd/cynara-check.socket.in
+++ b/systemd/cynara-check.socket.in
@@ -1,6 +1,6 @@
[Socket]
FileDescriptorName=check
-ListenStream=@SOCKET_DIR@/cynara.check
+ListenStream=@DEFAULT_SOCKET_DIR@/cynara.check
SocketMode=0666
SmackLabelIPIn=*
SmackLabelIPOut=@
diff --git a/systemd/cynara.service b/systemd/cynara.service
index e124b91..9cacce6 100644
--- a/systemd/cynara.service
+++ b/systemd/cynara.service
@@ -4,8 +4,7 @@ Requires=afm-system-setup.service
After=afm-system-setup.service
[Service]
-ExecStartPre=+-/usr/bin/sh -c 'if test ! -d /var/lib/cynara; then mkdir -p /var/lib/cynara; chown cynara:cynara /var/lib/cynara; chsmack -a System /var/lib/cynara; fi'
-ExecStart=/usr/bin/cynarad
+ExecStart=/usr/bin/cynarad --systemd --user cynara --group cynara --make-db-dir --own-db-dir
Type=notify
@@ -15,11 +14,11 @@ Restart=always
Sockets=cynara-admin.socket
Sockets=cynara-check.socket
-
-UMask=0000
-User=cynara
-Group=cynara
SmackProcessLabel=System
+
+#UMask=0000
+#User=cynara
+#Group=cynara
#NoNewPrivileges=true
#Environment="CYNARA_LOG_LEVEL=LOG_DEBUG"