From 3f65139b2825e654dd0cc36d1cee055b7ac959d9 Mon Sep 17 00:00:00 2001 From: Christian Mueller Date: Mon, 21 May 2012 19:00:35 +0200 Subject: * [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 --- cmake/config.cmake | 2 ++ cmake/genivi.audiomanager.service | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 cmake/genivi.audiomanager.service (limited to 'cmake') 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 -- cgit v1.2.1