mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
lib: Add daemon_status() to util library.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10816 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
22257dd4b6
commit
9f5f5fa8eb
@ -123,3 +123,14 @@ _PUBLIC_ void daemon_ready(const char *name)
|
||||
DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve "
|
||||
"connections\n", name));
|
||||
}
|
||||
|
||||
_PUBLIC_ void daemon_status(const char *name, const char *msg)
|
||||
{
|
||||
if (name == NULL) {
|
||||
name = "Samba";
|
||||
}
|
||||
#ifdef HAVE_SYSTEMD
|
||||
sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
|
||||
#endif
|
||||
DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
|
||||
}
|
||||
|
@ -852,6 +852,12 @@ _PUBLIC_ void exit_daemon(const char *msg, int error);
|
||||
**/
|
||||
_PUBLIC_ void daemon_ready(const char *daemon);
|
||||
|
||||
/*
|
||||
* Report the daemon status. For example if it is not ready to serve connections
|
||||
* and is waiting for some event to happen.
|
||||
*/
|
||||
_PUBLIC_ void daemon_status(const char *name, const char *msg);
|
||||
|
||||
/**
|
||||
* @brief Get a password from the console.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user