mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-08-06 13:18:31 +02:00
Integrated sd_notify to get status messages in systemd (#28)
* Integrated sd_notify to get status messages in systemd * reset color attributes after use in string
This commit is contained in:
@@ -40,6 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <systemd/sd-bus.h>
|
||||
#include <systemd/sd-daemon.h>
|
||||
|
||||
/* systemd dbus components */
|
||||
static sd_bus *bus = NULL;
|
||||
@@ -144,6 +145,7 @@ void game_mode_context_loop(GameModeContext *context)
|
||||
}
|
||||
|
||||
LOG_MSG("Successfully initialised bus with name [%s]...\n", "com.feralinteractive.GameMode");
|
||||
sd_notifyf(0,"STATUS=%sGameMode is ready to be activated.%s\n", "\x1B[1;36m", "\x1B[0m");
|
||||
|
||||
/* Now loop, waiting for callbacks */
|
||||
for (;;) {
|
||||
|
Reference in New Issue
Block a user