Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Added a start script option to run as a foreground process without JMX
luccioman02673379df88
diff --git a/docker/Dockerfile b/docker/Dockerfileindex 0c1d0584f..0de3ea251 100644--- a/docker/Dockerfile+++ b/docker/Dockerfile@@ -52,5 +52,5 @@ VOLUME ["/opt/yacy_search_server/DATA"]# Next commands run as yacy as non-root user for improved securityUSER yacy-# Start yacy in debug mode (-d) to display console logs and to wait for yacy process-CMD ["/bin/sh","/opt/yacy_search_server/startYACY.sh","-d"]+# Start yacy as a foreground process (-f) to display console logs and to wait for yacy process+CMD ["/bin/sh","/opt/yacy_search_server/startYACY.sh","-f"]diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpineindex bcc2dd96d..d5dbe92df 100755--- a/docker/Dockerfile.alpine+++ b/docker/Dockerfile.alpine@@ -84,5 +84,5 @@ VOLUME ["/opt/yacy_search_server/DATA"]# Next commands run as yacy as non-root user for improved securityUSER yacy-# Start yacy in debug mode (-d) to display console logs and to wait for yacy process-CMD ["/bin/sh","/opt/yacy_search_server/startYACY.sh","-d"]+# Start yacy as a foreground process (-f) to display console logs and to wait for yacy process+CMD ["/bin/sh","/opt/yacy_search_server/startYACY.sh","-f"]diff --git a/startYACY.sh b/startYACY.shindex eea089f01..a6ebf88e2 100755--- a/startYACY.sh+++ b/startYACY.sh@@ -38,7 +38,8 @@ Options-h, --help show this help-t, --tail-log show the output of "tail -f DATA/LOG/yacy00.log" after starting YaCy-l, --logging save the output of YaCy to yacy.log- -d, --debug show the output of YaCy on the console+ -d, --debug show the output of YaCy on the console and enable remote monitoring with JMX+ -f, --foreground run as a foreground process, showing the output of YaCy on the console-p, --print-out only print the command, which would be executed to start YaCy-s, --startup [data-path] start YaCy using the specified data folder path, relative to the current user home-g, --gui start a gui for YaCy@@ -57,7 +58,7 @@ thenoptions="`getopt hdlptsg: $*`"else- options="`getopt -n YaCy -o h,d,l,p,t,s,g -l help,debug,logging,print-out,tail-log,startup,gui -- $@`"+ options="`getopt -n YaCy -o h,d,f,l,p,t,s,g -l help,debug,foreground,logging,print-out,tail-log,startup,gui -- $@`"fiif [ $? -ne 0 ];then@@ -70,6 +71,7 @@ parameter="" #parameters will be collected hereLOGGING=0DEBUG=0+FOREGROUND=0PRINTONLY=0TAILLOG=0STARTUP=0@@ -87,6 +89,10 @@ for option in $options;doecho "can not combine -l and -d"exit 1;fi+ if [ $FOREGROUND -eq 1 ];then+ echo "can not combine -l and -f"+ exit 1;+ fi;;-d|--debug)DEBUG=1@@ -97,6 +103,13 @@ for option in $options;doexit 1;fi;;+ -f|--foreground)+ FOREGROUND=1+ if [ $LOGGING -eq 1 ];then+ echo "can not combine -l and -f"+ exit 1;+ fi+ ;;-p|--print-out)PRINTONLY=1;;@@ -209,6 +222,8 @@ fiif [ $DEBUG -eq 1 ] #debugthencmdline=$cmdline+elif [ $FOREGROUND -eq 1 ];then # foreground process without remote JMX monitoring+ cmdline=$cmdlineelif [ $LOGGING -eq 1 ];then #loggingcmdline="$cmdline >> yacy.log & echo \$! > $PIDFILE"else@@ -228,6 +243,9 @@ elsethen# with exec the java process become the main process and will receive signals such as SIGTERMexec $cmdline+ elif [ $FOREGROUND -eq 1 ];then # foreground process without remote JMX monitoring+ # with exec the java process become the main process and will receive signals such as SIGTERM+ exec $cmdlineelseecho " >> YaCy started as daemon process. Administration at http://localhost:$PORT << "eval $cmdline