From 275923e95ec5e974182ce1b2458b374906d4c646 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 3 Apr 2008 19:43:00 +0000 Subject: [PATCH] * due to demand of debian, we rename the webcit binary from webserver to webcit. * for migration make install wil create a symlink. --- webcit/Makefile.in | 14 +++++++++----- webcit/README.txt | 8 ++++---- webcit/debian/webcit.init | 2 +- webcit/setup.c | 10 +++++----- webcit/webserver.c | 10 +++++----- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/webcit/Makefile.in b/webcit/Makefile.in index 6b2a321b9..8d5bdc9f4 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -22,13 +22,13 @@ WWWDIR=@WWWDIR@ # End of configuration section -all: all-progs-recursive webserver setup +all: all-progs-recursive webcit setup .SUFFIXES: .cpp .c .o clean: - rm -f *.o webcit webserver setup + rm -f *.o webcit webcit setup rm -fr locale/* distclean: clean @@ -40,7 +40,7 @@ setup: setup.o $(CC) setup.o \ $(LIBOBJS) $(LIBS) $(LDFLAGS) $(SETUP_LIBS) -o setup -webserver: webserver.o context_loop.o ical_dezonify.o \ +webcit: webserver.o context_loop.o ical_dezonify.o \ cookie_conversion.o locate_host.o floors.o summary.o \ webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o \ roomops.o messages.o userlist.o paging.o sysmsgs.o useredit.o \ @@ -64,7 +64,7 @@ webserver: webserver.o context_loop.o ical_dezonify.o \ groupdav_options.o autocompletion.o tabs.o smtpqueue.o sieve.o \ groupdav_put.o http_datestring.o setup_wizard.o fmt_date.o \ gettext.o downloads.o addressbook_popup.o pushemail.o sysdep.o \ - $(LIBOBJS) $(LIBS) $(LDFLAGS) -o webserver + $(LIBOBJS) $(LIBS) $(LDFLAGS) -o webcit .c.o: $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) $< @@ -88,7 +88,11 @@ install: install-bin install-setupbin install-wwwdata install-tinymce install-l install-bin: test -d $(DESTDIR)$(prefix) || mkdir -p $(DESTDIR)$(prefix) - $(INSTALL) webserver $(DESTDIR)$(prefix)/webserver + $(INSTALL) webcit $(DESTDIR)$(prefix)/webcit + if test -f $(DESTDIR)$(prefix)/webserver; then \ + rm -f $(DESTDIR)$(prefix)/webserver; \ + ln -s $(DESTDIR)$(prefix)/webcit $(DESTDIR)$(prefix)/webserver; \ + fi install-setupbin: install-bin diff --git a/webcit/README.txt b/webcit/README.txt index eec1a2f87..d864e81d1 100644 --- a/webcit/README.txt +++ b/webcit/README.txt @@ -95,18 +95,18 @@ special circumstances, or if you'd prefer to configure WebCit manually, you may skip the setup program. Instead, open /etc/inittab and add an entry something like this: - wc:2345:respawn:/usr/local/webcit/webserver + wc:2345:respawn:/usr/local/webcit/webcit Several command-line options are also available. Here's the usage for -the "webserver" program: +the "webcit" program: - webserver [-i ip_addr] [-p http_port] [-s] [-t tracefile] + webcit [-i ip_addr] [-p http_port] [-s] [-t tracefile] [-c] [-f] [remotehost [remoteport]] *or* - webserver [-i ip_addr] [-p http_port] [-s] [-t tracefile] + webcit [-i ip_addr] [-p http_port] [-s] [-t tracefile] [-c] [-f] uds /your/citadel/directory Explained: diff --git a/webcit/debian/webcit.init b/webcit/debian/webcit.init index ffceaa0d0..ed55d07ac 100644 --- a/webcit/debian/webcit.init +++ b/webcit/debian/webcit.init @@ -14,7 +14,7 @@ RUNDIR=/var/run/webcit PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Citadel Groupware Webserver " -NAME=webserver +NAME=webcit DAEMON=/usr/sbin/$NAME DAEMON_ARGS="" PIDFILE=$RUNDIR/$NAME.pid diff --git a/webcit/setup.c b/webcit/setup.c index f1166e78c..25690cee1 100644 --- a/webcit/setup.c +++ b/webcit/setup.c @@ -90,11 +90,11 @@ void delete_the_old_way(void) { strcpy(init_entry, ""); - /* Determine the fully qualified path name of webserver */ - snprintf(looking_for, sizeof looking_for, "%s/webserver ", setup_directory); + /* Determine the fully qualified path name of webcit */ + snprintf(looking_for, sizeof looking_for, "%s/webcit ", setup_directory); /* Pound through /etc/inittab line by line. Set have_entry to 1 if - * an entry is found which we believe starts webserver. + * an entry is found which we believe starts webcit. */ infp = fopen("/etc/inittab", "r"); if (infp == NULL) { @@ -461,7 +461,7 @@ void install_init_scripts(void) "case \"$1\" in\n" "\n" "start) echo -n \"Starting WebCit... \"\n" - " if $WEBCIT_DIR/webserver " + " if $WEBCIT_DIR/webcit " "-D/var/run/webcit.pid " "-p$HTTP_PORT $CTDL_HOSTNAME $CTDL_PORTNAME\n" " then\n" @@ -471,7 +471,7 @@ void install_init_scripts(void) " fi\n"); #ifdef HAVE_OPENSSL fprintf(fp, " echo -n \"Starting WebCit SSL... \"\n" - " if $WEBCIT_DIR/webserver " + " if $WEBCIT_DIR/webcit " "-D/var/run/webcit-ssl.pid " "-s -p$HTTPS_PORT $CTDL_HOSTNAME $CTDL_PORTNAME\n" " then\n" diff --git a/webcit/webserver.c b/webcit/webserver.c index c99cff762..9ecc7d5d4 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -145,7 +145,7 @@ int ig_uds_server(char *sockpath, int queue_len) i = unlink(sockpath); if (i != 0) if (errno != ENOENT) { - lprintf(1, "webserver: can't unlink %s: %s\n", + lprintf(1, "webcit: can't unlink %s: %s\n", sockpath, strerror(errno)); exit(WC_EXIT_BIND); } @@ -156,19 +156,19 @@ int ig_uds_server(char *sockpath, int queue_len) s = socket(AF_UNIX, SOCK_STREAM, 0); if (s < 0) { - lprintf(1, "webserver: Can't create a socket: %s\n", + lprintf(1, "webcit: Can't create a socket: %s\n", strerror(errno)); exit(WC_EXIT_BIND); } if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - lprintf(1, "webserver: Can't bind: %s\n", + lprintf(1, "webcit: Can't bind: %s\n", strerror(errno)); exit(WC_EXIT_BIND); } if (listen(s, actual_queue_len) < 0) { - lprintf(1, "webserver: Can't listen: %s\n", + lprintf(1, "webcit: Can't listen: %s\n", strerror(errno)); exit(WC_EXIT_BIND); } @@ -765,7 +765,7 @@ int main(int argc, char **argv) is_https = 1; break; default: - fprintf(stderr, "usage: webserver " + fprintf(stderr, "usage: webcit " "[-i ip_addr] [-p http_port] " "[-t tracefile] [-c] [-f] " "[-d] " -- 2.30.2