diff options
author | Ernst de Haan <znerd@FreeBSD.org> | 2002-04-08 19:19:32 +0000 |
---|---|---|
committer | Ernst de Haan <znerd@FreeBSD.org> | 2002-04-08 19:19:32 +0000 |
commit | f50f786a2990f7e879a3caa7558daaf62d131db2 (patch) | |
tree | 4e1c3e5516bdb727bcb0a3d36ce7f9a1c8be57f4 /www/tomcat41 | |
parent | b9a80b5100f69d4992ff06d854d71d5b932e4067 (diff) | |
download | ports-f50f786a2990f7e879a3caa7558daaf62d131db2.tar.gz ports-f50f786a2990f7e879a3caa7558daaf62d131db2.zip |
Notes
Diffstat (limited to 'www/tomcat41')
-rw-r--r-- | www/tomcat41/Makefile | 2 | ||||
-rw-r--r-- | www/tomcat41/files/daemonctl.c | 17 |
2 files changed, 7 insertions, 12 deletions
diff --git a/www/tomcat41/Makefile b/www/tomcat41/Makefile index 6306727ab850..84ba2ca8030f 100644 --- a/www/tomcat41/Makefile +++ b/www/tomcat41/Makefile @@ -7,7 +7,7 @@ PORTNAME= jakarta-tomcat PORTVERSION= 4.0.3 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www java MASTER_SITES= http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v${PORTVERSION}/bin/ \ http://www.metaverse.nl/~ernst/ \ diff --git a/www/tomcat41/files/daemonctl.c b/www/tomcat41/files/daemonctl.c index a8b09bfb79b1..36bbde6fb259 100644 --- a/www/tomcat41/files/daemonctl.c +++ b/www/tomcat41/files/daemonctl.c @@ -4,7 +4,7 @@ * * Daemon control program. * - * $FreeBSD: /tmp/pcvs/ports/www/tomcat41/files/Attic/daemonctl.c,v 1.3 2002-04-03 20:42:07 znerd Exp $ + * $FreeBSD: /tmp/pcvs/ports/www/tomcat41/files/Attic/daemonctl.c,v 1.4 2002-04-08 19:19:31 znerd Exp $ */ #include <assert.h> @@ -109,7 +109,6 @@ int openPIDFile(void) { int file; /* Attempt to open the PID file */ - printf(">> Opening PID file (%%PID_FILE%%)..."); file = open("%%PID_FILE%%", O_RDWR); if (file < 0) { printf(" [ FAILED ]\n"); @@ -117,7 +116,6 @@ int openPIDFile(void) { perror(NULL); exit(ERR_PID_FILE_NOT_FOUND); } - printf(" [ DONE ]\n"); return file; } @@ -142,7 +140,6 @@ int readPID(int file) { int pid; /* Read the PID file contents */ - printf(">> Reading PID file..."); buffer = (char *) malloc((MAX_FILE_SIZE + 1) * sizeof(char)); count = read(file, buffer, MAX_FILE_SIZE + 1); if (count > MAX_FILE_SIZE) { @@ -245,10 +242,11 @@ void start(void) { struct stat sb; /* Open and read the PID file */ + printf(">> Reading PID file (%%PID_FILE%%)..."); file = openPIDFile(); pid = readPID(file); - printf(">> Checking that %%APP_TITLE%% is not already running..."); + printf(">> Starting %%APP_TITLE%%..."); if (pid != -1) { /* Check if the process actually exists */ @@ -260,9 +258,7 @@ void start(void) { } } - printf(" [ DONE ]\n"); - - printf(">> Checking for Java VM..."); + /* Check if the JDK home directory is actually a directory */ result = stat("%%JAVA_HOME%%", &sb); if (result != 0) { printf(" [ FAILED ]\n"); @@ -276,6 +272,7 @@ void start(void) { exit(ERR_JAVA_HOME_NOT_DIR); } + /* Check if the Java command is actually an executable regular file */ result = stat("%%JAVA_HOME%%/%%JAVA_CMD%%", &sb); if (result != 0) { printf(" [ FAILED ]\n"); @@ -295,9 +292,6 @@ void start(void) { perror(NULL); exit(ERR_JAVA_CMD_NOT_EXECUTABLE); } - printf(" [ DONE ]\n"); - - printf(">> Starting %%APP_TITLE%%..."); /* Change directory */ result = chdir("%%APP_HOME%%"); @@ -368,6 +362,7 @@ void stop(void) { int pid; /* Open and read the PID file */ + printf(">> Opening PID file (%%PID_FILE%%)..."); file = openPIDFile(); pid = readPID(file); |