2023-02-08 13:17:09 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2016-02-10 13:24:11 +01:00
|
|
|
/* lib/systemd Code
|
2017-05-13 10:25:29 +02:00
|
|
|
* Copyright (C) 2016 Cumulus Networks, Inc.
|
|
|
|
* Donald Sharp
|
|
|
|
*/
|
2016-02-10 13:24:11 +01:00
|
|
|
|
2019-02-07 23:10:31 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-01-16 16:15:41 +01:00
|
|
|
/* fd 1/2 connected to journald? */
|
|
|
|
extern bool sd_stdout_is_journal;
|
|
|
|
extern bool sd_stderr_is_journal;
|
|
|
|
|
2016-02-10 13:24:11 +01:00
|
|
|
/*
|
|
|
|
* Wrapper functions to systemd calls.
|
|
|
|
*
|
|
|
|
* Design point is that if systemd is not being used on this system
|
|
|
|
* then these functions becomes a no-op.
|
|
|
|
*/
|
|
|
|
void systemd_send_stopping(void);
|
2016-04-25 17:34:35 +02:00
|
|
|
|
|
|
|
/*
|
2023-03-07 20:14:41 +01:00
|
|
|
* master - The struct event_loop * to use to schedule ourself
|
2016-04-25 17:34:35 +02:00
|
|
|
* the_process - Should we send watchdog if we are not the requested
|
|
|
|
* process?
|
|
|
|
*/
|
2023-03-07 20:14:41 +01:00
|
|
|
void systemd_send_started(struct event_loop *master);
|
2019-02-07 23:10:31 +01:00
|
|
|
|
2019-10-04 03:09:28 +02:00
|
|
|
/*
|
|
|
|
* status - A status string to send to systemd
|
|
|
|
*/
|
|
|
|
void systemd_send_status(const char *status);
|
|
|
|
|
2021-04-19 10:33:18 +02:00
|
|
|
/*
|
|
|
|
* grab startup state from env vars
|
|
|
|
*/
|
|
|
|
void systemd_init_env(void);
|
|
|
|
|
2019-02-07 23:10:31 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|