Fixes #1226
Moved jetty.sh to jetty-home relocated JETTY_RUN to be a jetty directory in /var/run etc. moved start.log to be in JETTY_RUN
This commit is contained in:
parent
ced72c52bd
commit
bf60197490
|
@ -11,7 +11,7 @@
|
|||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<assembly-directory>${basedir}/target/home</assembly-directory>
|
||||
<assembly-directory>${basedir}/target/jetty-home</assembly-directory>
|
||||
<jetty-setuid-version>1.0.3</jetty-setuid-version>
|
||||
</properties>
|
||||
|
||||
|
@ -340,6 +340,24 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>set jetty.sh</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<chmod dir="${assembly-directory}/bin" perm="755" includes="**/*.sh" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
|
|
|
@ -274,7 +274,8 @@ fi
|
|||
#####################################################
|
||||
if [ -z "$JETTY_RUN" ]
|
||||
then
|
||||
JETTY_RUN=$(findDirectory -w /var/run /usr/var/run $JETTY_BASE /tmp)
|
||||
JETTY_RUN=$(findDirectory -w /var/run /usr/var/run $JETTY_BASE /tmp)/jetty
|
||||
[ -d "$JETTY_RUN" ] || mkdir $JETTY_RUN
|
||||
fi
|
||||
|
||||
#####################################################
|
||||
|
@ -433,7 +434,7 @@ case "$ACTION" in
|
|||
CH_USER="-c$JETTY_USER"
|
||||
fi
|
||||
|
||||
start-stop-daemon -S -p"$JETTY_PID" $CH_USER -d"$JETTY_BASE" -b -m -a "$JAVA" -- "${RUN_ARGS[@]}" start-log-file="$JETTY_LOGS/start.log"
|
||||
start-stop-daemon -S -p"$JETTY_PID" $CH_USER -d"$JETTY_BASE" -b -m -a "$JAVA" -- "${RUN_ARGS[@]}" start-log-file="$JETTY_RUN/start.log"
|
||||
|
||||
else
|
||||
|
||||
|
@ -455,7 +456,7 @@ case "$ACTION" in
|
|||
chown "$JETTY_USER" "$JETTY_PID"
|
||||
# FIXME: Broken solution: wordsplitting, pathname expansion, arbitrary command execution, etc.
|
||||
su - "$JETTY_USER" $SU_SHELL -c "
|
||||
exec ${RUN_CMD[*]} start-log-file="$JETTY_LOGS/start.log" > /dev/null &
|
||||
exec ${RUN_CMD[*]} start-log-file="$JETTY_RUN/start.log" > /dev/null &
|
||||
disown \$!
|
||||
echo \$! > '$JETTY_PID'"
|
||||
else
|
Loading…
Reference in New Issue