version 1.1, 2022/03/13 23:06:39 |
version 1.5, 2022/03/17 09:09:26 |
|
|
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
#include <unistd.h> |
|
#include <syslog.h> |
|
|
|
#include "blind.h" |
|
#include "log.h" |
|
|
|
static void usage(void); |
|
|
|
int daemonize = 1; |
|
int verbose = 0; |
|
|
|
static void |
|
usage(void) |
|
{ |
|
extern char *__progname; |
|
|
|
fprintf(stderr, "usage: %s [-dhnv] [-f file]\n", __progname); |
|
exit(1); |
|
} |
|
|
int |
int |
main(int argc, char *argv[]) |
main(int argc, char *argv[]) |
{ |
{ |
printf("under construction\n"); |
int ch; |
|
int no_action = 0; |
|
const char *config = BL_CONF; |
|
|
|
while ((ch = getopt(argc, argv, "dhnvf:")) != -1) { |
|
switch (ch) { |
|
case 'd': |
|
daemonize = 0; |
|
break; |
|
case 'h': |
|
fprintf(stderr, BL_TEXT " " BL_VERS "\n"); |
|
usage(); |
|
break; |
|
case 'n': |
|
no_action = 1; |
|
break; |
|
case 'f': |
|
config = optarg; |
|
break; |
|
case 'v': |
|
verbose = 1; |
|
break; |
|
default: |
|
usage(); |
|
} |
|
} |
|
argc -= optind; |
|
argv += optind; |
|
|
|
if (argc || *argv) |
|
usage(); |
|
|
|
log_init(daemonize, LOG_DAEMON); |
|
log_setv(verbose); |
|
|
|
log_info("info: %s %s starting", BL_TEXT, BL_VERS); |
|
log_debug("debug: test"); |
|
|
|
// default_conf initialization (BLIND STRUCT) |
|
|
|
// TAILQ_INIT(&offline_queue) |
|
|
|
// parse_config |
|
|
exit(0); |
exit(0); |
} |
} |