From 1746e8b8399da2a7a8da4aace186f66055ccfec1 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 27 Jun 2014 17:24:16 +0200 Subject: TOOLS: New helper tool sss_signal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A minimal tool whose only purpose is to signal the monitor with SIGUSR2. The tool will be executed by the system bus in order to provide system activation, so it's packaged in libexec. Reviewed-by: Pavel Březina --- src/tools/sss_signal.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/tools/sss_signal.c (limited to 'src') diff --git a/src/tools/sss_signal.c b/src/tools/sss_signal.c new file mode 100644 index 00000000..efddcce3 --- /dev/null +++ b/src/tools/sss_signal.c @@ -0,0 +1,37 @@ +/* + Authors: + Jakub Hrozek + + Copyright (C) 2014 Red Hat + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include + +#include "config.h" +#include "tools/tools_util.h" + +int main(int argc, const char **argv) +{ + int ret; + + ret = signal_sssd(SIGUSR2); + if (ret != EOK) { + ERROR("Could not signal SSSD. Is SSSD running?\n"); + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} -- cgit