]> git.proxmox.com Git - mirror_frr.git/blob - lib/systemd.h
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / lib / systemd.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* lib/systemd Code
3 * Copyright (C) 2016 Cumulus Networks, Inc.
4 * Donald Sharp
5 */
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 /* fd 1/2 connected to journald? */
12 extern bool sd_stdout_is_journal;
13 extern bool sd_stderr_is_journal;
14
15 /*
16 * Wrapper functions to systemd calls.
17 *
18 * Design point is that if systemd is not being used on this system
19 * then these functions becomes a no-op.
20 */
21 void systemd_send_stopping(void);
22
23 /*
24 * master - The struct event_loop * to use to schedule ourself
25 * the_process - Should we send watchdog if we are not the requested
26 * process?
27 */
28 void systemd_send_started(struct event_loop *master);
29
30 /*
31 * status - A status string to send to systemd
32 */
33 void systemd_send_status(const char *status);
34
35 /*
36 * grab startup state from env vars
37 */
38 void systemd_init_env(void);
39
40 #ifdef __cplusplus
41 }
42 #endif