diff --git a/src/Makefile.am b/src/Makefile.am index 0419f19e..61a12637 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,3 +40,9 @@ ckdb_SOURCES = ckdb.c ckdb_cmd.c ckdb_data.c ckdb_dbio.c ckdb_btc.c \ ckdb_crypt.c ckdb.h klist.c ktree.c klist.h ktree.h ckdb_LDADD = libckpool.a @JANSSON_LIBS@ @LIBS@ endif + +install-exec-hook: + $(LN_S) -f ckpool $(DESTDIR)$(bindir)/ckproxy + +uninstall-local: + rm -f $(bindir)/ckproxy diff --git a/src/ckpool.c b/src/ckpool.c index 8b6363e3..480d3bda 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -1630,6 +1630,7 @@ int main(int argc, char **argv) struct sigaction handler; int c, ret, i = 0, j; char buf[512] = {}; + char *appname; ckpool_t ckp; /* Make significant floating point errors fatal to avoid subtle bugs being missed */ @@ -1646,6 +1647,10 @@ int main(int argc, char **argv) ckp.initial_args[ckp.args] = strdup(argv[ckp.args]); ckp.initial_args[ckp.args] = NULL; + appname = basename(argv[0]); + if (!strcmp(appname, "ckproxy")) + ckp.proxy = true; + while ((c = getopt_long(argc, argv, "Ac:Dd:g:HhkLl:Nn:PpqRS:s:tu", long_options, &i)) != -1) { switch (c) { case 'A':