diff options
author | Ernst de Haan <znerd@FreeBSD.org> | 2002-05-08 22:00:04 +0000 |
---|---|---|
committer | Ernst de Haan <znerd@FreeBSD.org> | 2002-05-08 22:00:04 +0000 |
commit | 156b71b59f6afc3092ffb99270dc62b994d39002 (patch) | |
tree | e45c063c60b3060d59c6c2bc3dbc2a04e1aeb557 /www/jakarta-tomcat41 | |
parent | 15db7d6349aeb97a013636e056167aeb308f161b (diff) | |
download | ports-156b71b59f6afc3092ffb99270dc62b994d39002.tar.gz ports-156b71b59f6afc3092ffb99270dc62b994d39002.zip |
Notes
Diffstat (limited to 'www/jakarta-tomcat41')
-rw-r--r-- | www/jakarta-tomcat41/Makefile | 2 | ||||
-rw-r--r-- | www/jakarta-tomcat41/files/daemonctl.c | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/www/jakarta-tomcat41/Makefile b/www/jakarta-tomcat41/Makefile index ef5efb825a57..04457e0d8f66 100644 --- a/www/jakarta-tomcat41/Makefile +++ b/www/jakarta-tomcat41/Makefile @@ -7,7 +7,7 @@ PORTNAME= jakarta-tomcat PORTVERSION= 4.0.3 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= www java MASTER_SITES= http://jakarta.apache.org/builds/jakarta-tomcat-${PORTVERSION:R}/release/v${PORTVERSION}/bin/ \ http://www.metaverse.nl/~ernst/ \ diff --git a/www/jakarta-tomcat41/files/daemonctl.c b/www/jakarta-tomcat41/files/daemonctl.c index 2143d525fceb..3ddbdb98edf7 100644 --- a/www/jakarta-tomcat41/files/daemonctl.c +++ b/www/jakarta-tomcat41/files/daemonctl.c @@ -4,7 +4,7 @@ * * Daemon control program. * - * $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat41/files/Attic/daemonctl.c,v 1.5 2002-04-08 21:50:22 znerd Exp $ + * $FreeBSD: /tmp/pcvs/ports/www/jakarta-tomcat41/files/Attic/daemonctl.c,v 1.6 2002-05-08 22:00:04 znerd Exp $ */ #include <assert.h> @@ -36,6 +36,7 @@ #define ERR_ALREADY_RUNNING 6 #define ERR_NOT_RUNNING 7 #define ERR_CHDIR_TO_APP_HOME 8 +#define ERR_ACCESS_JAR_FILE 17 #define ERR_STDOUT_LOGFILE_OPEN 9 #define ERR_STDERR_LOGFILE_OPEN 10 #define ERR_FORK_FAILED 11 @@ -370,6 +371,15 @@ void start(void) { exit(ERR_CHDIR_TO_APP_HOME); } + /* See if the JAR file exists */ + result = access("%%APP_HOME%%/%%JAR_FILE%%", R_OK); + if (result < 0) { + printf(" [ FAILED ]\n"); + fprintf(stderr, "%%CONTROL_SCRIPT_NAME%%: Unable to access JAR file %%APP_HOME%%/%%JAR_FILE%%: "); + perror(NULL); + exit(ERR_ACCESS_JAR_FILE); + } + /* Open the stdout log file */ stdoutLogFile = open("%%STDOUT_LOG%%", O_WRONLY); if (stdoutLogFile < 0) { |