summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorChristian Mueller <christian.ei.mueller@bmw.de>2012-05-21 19:00:35 +0200
committerchristian mueller <christian.ei.mueller@bmw.de>2012-05-24 13:40:23 +0200
commit3f65139b2825e654dd0cc36d1cee055b7ac959d9 (patch)
treef9baf9833b8da138428c7ee295f6af7953c7085f /cmake
parenta572fc87a811563f62b88116de699f803915383e (diff)
downloadaudiomanager-3f65139b2825e654dd0cc36d1cee055b7ac959d9.tar.gz
* [GAM-24] Watchdog concept for the AudioManager. This patch introduces the watchdog functionality of the AudioManager. The function is based on the systemd watchdog functionality. The desired time intervals for checking the watchdog can be tweaked by the unit file for systemd. A sample unit file is added to the subdirectory cmake. Via Cmake build option, the watchdog functionality can be switched off.
If the development package from systemd is available it will use the lib that comes with it. If not, the default handler will be compiled along with the audiomanager and this one will be used. Signed-off-by: Christian Mueller <christian.ei.mueller@bmw.de>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config.cmake2
-rw-r--r--cmake/genivi.audiomanager.service34
2 files changed, 36 insertions, 0 deletions
diff --git a/cmake/config.cmake b/cmake/config.cmake
index c492276..4e65e3d 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -7,6 +7,8 @@
#cmakedefine WITH_DLT
#cmakedefine WITH_TELNET
#cmakedefine GLIB_DBUS_TYPES_TOLERANT
+#cmakedefine WITH_SYSTEMD_WATCHDOG
+#cmakedefine SYSTEMD_FOUND
#cmakedefine DEFAULT_PLUGIN_COMMAND_DIR "@DEFAULT_PLUGIN_COMMAND_DIR@"
#cmakedefine DEFAULT_PLUGIN_ROUTING_DIR "@DEFAULT_PLUGIN_ROUTING_DIR@"
diff --git a/cmake/genivi.audiomanager.service b/cmake/genivi.audiomanager.service
new file mode 100644
index 0000000..e1e2d01
--- /dev/null
+++ b/cmake/genivi.audiomanager.service
@@ -0,0 +1,34 @@
+# Copyright (C) 2012, BMW AG
+#
+# This file is part of GENIVI Project AudioManager.
+#
+# Contributions are licensed to the GENIVI Alliance under one or more
+# Contribution License Agreements.
+#
+# copyright
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+#
+# For further information see http://www.genivi.org/.
+#
+
+# This is a sample unit file that utilized the watchdog functionality of the AudioManager.
+# If the time WatchdogSec equals 0, no watchdog function will be used.
+
+
+[Unit]
+Description=The GENIVI AudioManager
+
+[Service]
+#Type=notify
+User=christian
+ExecStart=/home/christian/workspace/AudioManager/bin/AudioManager
+Restart=always
+WatchdogSec=2
+NotifyAccess=main
+
+[Install]
+WantedBy=multi-user.target