mirror of
https://github.com/Theldus/alertik.git
synced 2024-11-28 02:23:43 +01:00
Add commit hash on banner
This commit is contained in:
parent
4760bd2fbe
commit
18efb5f77e
6
Makefile
6
Makefile
@ -7,6 +7,7 @@ CC ?= cc
|
||||
CFLAGS += -Wall -Wextra
|
||||
LDLIBS += -pthread -lcurl
|
||||
STRIP = strip
|
||||
VERSION = v0.1
|
||||
|
||||
ifeq ($(LOG_FILE),yes)
|
||||
CFLAGS += -DUSE_FILE_AS_LOG
|
||||
@ -23,6 +24,11 @@ ifneq ($(CROSS),)
|
||||
LDFLAGS += -no-pie --static
|
||||
endif
|
||||
|
||||
GIT_HASH=$(shell git rev-parse --short HEAD 2>/dev/null || echo '$(VERSION)')
|
||||
CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\"
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: alertik Makefile
|
||||
$(STRIP) --strip-all alertik
|
||||
|
||||
|
@ -449,14 +449,17 @@ int main(void)
|
||||
"- TELEGRAM_NICKNAME\n");
|
||||
}
|
||||
|
||||
log_msg("Alertik v%s started...\n", ALERTIK_VERSION);
|
||||
log_msg(
|
||||
"Alertik (" GIT_HASH ") (built at " __DATE__ " " __TIME__ ")\n");
|
||||
log_msg(" (https://github.com/Theldus/alertik)\n");
|
||||
log_msg("-------------------------------------------------\n");
|
||||
|
||||
fd = create_socket();
|
||||
if (pthread_create(&handler, NULL, handle_messages, NULL))
|
||||
panic_errno("Unable to create hanler thread!");
|
||||
|
||||
log_msg("Waiting for messages...\n");
|
||||
log_msg("Waiting for messages at :%d (UDP)...\n", SYSLOG_PORT);
|
||||
|
||||
while (read_new_upd_msg(fd) >= 0);
|
||||
return (EXIT_SUCCESS);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user