Skip to content

The Unified and Autonomous Development Platform

Update JSW to 3.5.44

Robin Shen295fb9093f95
diff --git a/pom.xml b/pom.xml
index 0df84999b8..324dd17517 100644
--- a/pom.xml
+++ b/pom.xml
@@ -108,7 +108,7 @@
<plugin>
<groupId>io.onedev</groupId>
<artifactId>plugin-maven</artifactId>
- <version>2.0.4</version>
+ <version>2.0.5</version>
<executions>
<execution>
<id>populate-resources</id>
@@ -573,8 +573,8 @@
</repository>
</repositories>
<properties>
- <commons.version>1.1.20</commons.version>
- <k8shelper.version>1.0.19</k8shelper.version>
+ <commons.version>1.1.21</commons.version>
+ <k8shelper.version>1.0.20</k8shelper.version>
<slf4j.version>1.7.5</slf4j.version>
<logback.version>1.0.11</logback.version>
<antlr.version>4.7.2</antlr.version>
diff --git a/server-plugin/server-plugin-archetype/src/main/resources/archetype-resources/pom.xml b/server-plugin/server-plugin-archetype/src/main/resources/archetype-resources/pom.xml
index fdc950faf2..5c7a199d02 100644
--- a/server-plugin/server-plugin-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/server-plugin/server-plugin-archetype/src/main/resources/archetype-resources/pom.xml
@@ -114,7 +114,7 @@
<plugin>
<groupId>io.onedev</groupId>
<artifactId>plugin-maven</artifactId>
- <version>2.0.4</version>
+ <version>2.0.5</version>
<executions>
<execution>
<id>populate-resources</id>
diff --git a/server-product/jsw/sh.script.in b/server-product/jsw/App.sh.in
similarity index 90%
rename from server-product/jsw/sh.script.in
rename to server-product/jsw/App.sh.in
index 319fba7900..57affb9bc2 100644
--- a/server-product/jsw/sh.script.in
+++ b/server-product/jsw/App.sh.in
@@ -1,7 +1,7 @@
#! /bin/sh
#
-# Copyright (c) 1999, 2019 Tanuki Software, Ltd.
+# Copyright (c) 1999, 2020 Tanuki Software, Ltd.
# http://www.tanukisoftware.com
# All rights reserved.
#
@@ -12,11 +12,11 @@
#
# Java Service Wrapper sh script. Suitable for starting and stopping
# wrapped Java applications on UNIX platforms.
+# Optimized for use with version 3.5.44-st of the Wrapper.
#
#-----------------------------------------------------------------------------
# These settings can be modified to fit the needs of your application
-# Optimized for use with version 3.5.41-st of the Wrapper.
# IMPORTANT - Please always stop and uninstall an application before making
# any changes to this file. Failure to do so could remove the
@@ -31,15 +31,16 @@
# least the 'INIT INFO' below needs to be updated).
# Initialization block for the install_initd and remove_initd scripts used by
-# SUSE linux, CentOS and RHEL distributions.
+# SUSE linux, CentOS and RHEL distributions. Also used by update-rc.d.
# Note: From CentOS 6, make sure the BEGIN INIT INFO section is before any line
# of code otherwise the service won't be displayed in the Service
# Configuration GUI.
### BEGIN INIT INFO
# Provides: @app.name@
-# Required-Start: $local_fs $network $syslog
-# Should-Start:
-# Required-Stop:
+# Required-Start: $remote_fs $syslog
+# Should-Start: $network $time
+# Should-Stop: $network $time
+# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: @app.long.name@
@@ -224,23 +225,59 @@ gettext() {
fi
}
-resolveIdLocation() {
- if [ "X$ID_BIN" = "X" ] ; then
- # On Solaris, the version in /usr/xpg4/bin should be used.
- ID_BIN="/usr/xpg4/bin/id"
- if [ ! -x "$ID_BIN" ] ; then
- ID_BIN="id"
- result=`command -v id 2>/dev/null`
- if [ $? -ne 0 ] ; then
- ID_BIN="/usr/bin/id"
- if [ ! -x "$ID_BIN" ] ; then
- eval echo `gettext 'Unable to locate "id".'`
- eval echo `gettext 'Please report this message along with the location of the command on your system.'`
- exit 1
+##
+# Resolves the location of a system command.
+#
+# $1: the name of the variable to set (without the $)
+# $2: the name of the command
+# $3: an ordered and semicolon-separated list of paths where the command should
+# be searched. The list should contain an empty value for the command to be
+# searched using the PATH environment variable.
+# $4: 1 to be strict (the script will stop with an error), 0 otherwise.
+resolveLocation() {
+ eval "CMD_TEMP=\$$1"
+ if [ "X$CMD_TEMP" = "X" ] ; then
+ found=0
+
+ OIFS=$IFS
+ IFS=';'
+ for CMD_PATH in $3
+ do
+ if [ -z "$CMD_PATH" ] ; then
+ # empty path
+ CMD_TEMP="$2"
+ ret=`command -v $CMD_TEMP 2>/dev/null`
+ if [ $? -eq 0 ] ; then
+ found=1
+ break
+ fi
+ else
+ CMD_TEMP="${CMD_PATH}/$2"
+ if [ -x "$CMD_TEMP" ] ; then
+ found=1
+ break
fi
fi
+ done
+ IFS=$OIFS
+
+ if [ $found -eq 1 ] ; then
+ eval "$1=$CMD_TEMP"
+ elif [ $4 -eq 1 ] ; then
+ eval echo `gettext 'Unable to locate "$2".'`
+ eval echo `gettext 'Please report this message along with the location of the command on your system.'`
+ exit 1
+ else
+ # return the error
+ return 1
fi
fi
+ return 0
+}
+
+resolveIdLocation() {
+ # On Solaris, the version in /usr/xpg4/bin should be used in priority.
+ resolveLocation ID_BIN id "/usr/xpg4/bin/id;;/usr/bin/id" 1
}
resolveCurrentUser() {
@@ -250,24 +287,6 @@ resolveCurrentUser() {
fi
}
-resolvePidofLocation() {
- if [ "X$PIDOF_BIN" = "X" ] ; then
- PIDOF_BIN="pidof"
- result=`command -v pidof 2>/dev/null`
- if [ $? -ne 0 ] ; then
- PIDOF_BIN="/bin/pidof"
- if [ ! -x "$PIDOF_BIN" ] ; then
- PIDOF_BIN="/usr/sbin/pidof"
- if [ ! -x "$PIDOF_BIN" ] ; then
- eval echo `gettext 'Unable to locate "pidof".'`
- eval echo `gettext 'Please report this message along with the location of the command on your system.'`
- exit 1
- fi
- fi
- fi
- fi
-}
-
# check if we are running under Cygwin terminal.
# Note: on some OS's (for example Solaris, MacOS), -o is not a valid parameter
# and it shows an error message. We redirect stderr to null so the error message
@@ -483,34 +502,10 @@ LOCKDIR="/var/lock/subsys"
LOCKFILE="$LOCKDIR/$APP_NAME"
pid=""
-# Resolve the location of the 'ps' command
-PS_BIN="/usr/ucb/ps"
-if [ ! -x "$PS_BIN" ]
-then
- PS_BIN="/usr/bin/ps"
- if [ ! -x "$PS_BIN" ]
- then
- PS_BIN="/bin/ps"
- if [ ! -x "$PS_BIN" ]
- then
- eval echo `gettext 'Unable to locate "ps".'`
- eval echo `gettext 'Please report this message along with the location of the command on your system.'`
- exit 1
- fi
- fi
-fi
+# Resolve the location of the 'ps' & 'tr' command
+resolveLocation PS_BIN ps "/usr/ucb;/usr/bin;/bin" 1
+resolveLocation TR_BIN tr "/usr/bin;/bin" 1
-TR_BIN="/usr/bin/tr"
-if [ ! -x "$TR_BIN" ]
-then
- TR_BIN="/bin/tr"
- if [ ! -x "$TR_BIN" ]
- then
- eval echo `gettext 'Unable to locate "tr".'`
- eval echo `gettext 'Please report this message along with the location of the command on your system.'`
- exit 1
- fi
-fi
# Resolve the os
DIST_OS=`uname -s | $TR_BIN "[A-Z]" "[a-z]" | $TR_BIN -d ' '`
case "$DIST_OS" in
@@ -521,7 +516,7 @@ case "$DIST_OS" in
# HP-UX needs the XPG4 version of ps (for -o args)
DIST_OS="hpux"
UNIX95=""
- export UNIX95
+ export UNIX95
;;
'darwin')
DIST_OS="macosx"
@@ -533,23 +528,7 @@ case "$DIST_OS" in
DIST_OS="zos"
;;
'linux')
- if [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/redhat_version ] ; then
- if [ "X`command -v /sbin/chkconfig`" != "X" ] ; then
- DIST_LINUX_FAMILY="Red Hat"
- fi
- elif [ -f /etc/SuSE-release ] ; then
- if [ "X`command -v insserv`" != "X" ] ; then
- DIST_LINUX_FAMILY="SUSE"
- fi
- elif [ -f /etc/lsb-release -o -f /etc/debian_version -o -f /etc/debian_release ] ; then
- if [ "X`command -v update-rc.d`" != "X" ] ; then
- DIST_LINUX_FAMILY="Debian"
- fi
- fi
- DIST_LINUX_NAME=`grep "^NAME=" /etc/os-release 2>/dev/null | cut -d= -f 2 | sed 's/\"//g'`
- if [ "$DIST_LINUX_NAME" = "Amazon Linux" ] && [ "X`command -v /sbin/chkconfig`" != "X" ] ; then
- DIST_LINUX_FAMILY="Red Hat"
- fi
+ DIST_OS="linux"
;;
esac
@@ -1343,7 +1322,7 @@ launchinternal() {
if [ "X$pid" = "X" ]
then
# The string passed to eval must handles spaces in paths correctly.
- COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" wrapper.daemonize=TRUE $APPNAMEPROP $ANCHORPROP $IGNOREPROP $STATUSPROP $COMMANDPROP $LOCKPROP wrapper.script.version=3.5.41 $ADDITIONAL_PARA"
+ COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" wrapper.daemonize=TRUE $APPNAMEPROP $ANCHORPROP $IGNOREPROP $STATUSPROP $COMMANDPROP $LOCKPROP wrapper.script.version=3.5.44 $ADDITIONAL_PARA"
eval $COMMAND_LINE
else
eval echo `gettext '$APP_LONG_NAME is already running.'`
@@ -1366,7 +1345,7 @@ console() {
prepAdditionalParams "$@"
# The string passed to eval must handles spaces in paths correctly.
- COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" $APPNAMEPROP $ANCHORPROP $STATUSPROP $COMMANDPROP $LOCKPROP wrapper.script.version=3.5.41 $ADDITIONAL_PARA"
+ COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" $APPNAMEPROP $ANCHORPROP $STATUSPROP $COMMANDPROP $LOCKPROP wrapper.script.version=3.5.44 $ADDITIONAL_PARA"
eval $COMMAND_LINE
COMMAND_EXIT_CODE=$?
if [ $COMMAND_EXIT_CODE -ne 0 ] ; then
@@ -1566,12 +1545,12 @@ upstartInstall() {
return 1
fi
- eval echo `gettext ' Installing the $APP_LONG_NAME daemon using upstart...'`
+ eval echo `gettext ' Installing the $APP_LONG_NAME daemon with upstart...'`
if [ -f "${REALDIR}/${APP_NAME}.install" ] ; then
- eval echo `gettext ' a custom upstart conf file ${APP_NAME}.install found'`
+ eval echo `gettext ' Custom upstart conf file ${APP_NAME}.install found.'`
cp "${REALDIR}/${APP_NAME}.install" "/etc/init/${APP_NAME}.conf"
else
- eval echo `gettext ' creating default upstart conf file...'`
+ eval echo `gettext ' Creating default upstart conf file...'`
echo "# ${APP_NAME} - ${APP_LONG_NAME}" > "/etc/init/${APP_NAME}.conf"
echo "description \"${APP_LONG_NAME}\"" >> "/etc/init/${APP_NAME}.conf"
echo "author \"Tanuki Software Ltd. <[email protected]>\"" >> "/etc/init/${APP_NAME}.conf"
@@ -1624,7 +1603,7 @@ upstartRestart() {
upstartRemove() {
stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon from upstart...'`
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon from upstart...'`
rm "/etc/init/${APP_NAME}.conf"
}
@@ -1635,7 +1614,7 @@ systemdDetection() {
return 1
fi
- resolvePidofLocation
+ resolveLocation PIDOF_BIN pidof ";/bin;/usr/sbin" 1
result=`$PIDOF_BIN systemd`
return $?
}
@@ -1648,12 +1627,12 @@ systemdInstall() {
return 1
fi
- eval echo `gettext ' Installing the $APP_LONG_NAME daemon using systemd...'`
+ eval echo `gettext ' Installing the $APP_LONG_NAME daemon with systemd...'`
if [ -f "${REALDIR}/${APP_NAME}.service" ] ; then
- eval echo `gettext ' a custom service file ${APP_NAME}.service found'`
+ eval echo `gettext ' Custom service file ${APP_NAME}.service found.'`
cp "${REALDIR}/${APP_NAME}.service" "${SYSTEMD_SERVICE_FILE}"
else
- eval echo `gettext ' creating default service file...'`
+ eval echo `gettext ' Creating default service file...'`
echo "[Unit]" > "${SYSTEMD_SERVICE_FILE}"
echo "Description=${APP_LONG_NAME}" >> "${SYSTEMD_SERVICE_FILE}"
echo "After=syslog.target" >> "${SYSTEMD_SERVICE_FILE}"
@@ -1704,7 +1683,7 @@ systemdStart() {
systemctl start $APP_NAME
if [ $? -ne 0 ] ; then
- eval echo `gettext 'Failed to start service $APP_NAME'`
+ eval echo `gettext 'Failed to start $APP_LONG_NAME.'`
exit 1
fi
@@ -1720,7 +1699,7 @@ systemdStop() {
systemctl stop $APP_NAME
if [ $? -ne 0 ] ; then
- eval echo `gettext 'Failed to stop service $APP_NAME'`
+ eval echo `gettext 'Failed to stop $APP_LONG_NAME.'`
exit 1
fi
}
@@ -1742,7 +1721,7 @@ systemdRestart() {
systemdRemove() {
stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon from systemd...'`
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon from systemd...'`
systemctl disable $APP_NAME
rm "/etc/systemd/system/${APP_NAME}.service"
systemctl daemon-reload
@@ -1788,7 +1767,7 @@ srcStart() {
startsrc -s "${APP_NAME}"
if [ $? -ne 0 ] ; then
- eval echo `gettext 'Failed to start service $APP_NAME'`
+ eval echo `gettext 'Failed to start $APP_LONG_NAME.'`
exit 1
fi
@@ -1804,7 +1783,7 @@ srcStop() {
stopsrc -s "${APP_NAME}"
if [ $? -ne 0 ] ; then
- eval echo `gettext 'Failed to stop service $APP_NAME'`
+ eval echo `gettext 'Failed to stop $APP_LONG_NAME.'`
exit 1
fi
}
@@ -1830,7 +1809,7 @@ start() {
prepAdditionalParams "$@"
# The string passed to eval must handles spaces in paths correctly.
- COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" wrapper.daemonize=TRUE $APPNAMEPROP $ANCHORPROP $IGNOREPROP $STATUSPROP $COMMANDPROP $LOCKPROP wrapper.script.version=3.5.41 $ADDITIONAL_PARA"
+ COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" wrapper.daemonize=TRUE $APPNAMEPROP $ANCHORPROP $IGNOREPROP $STATUSPROP $COMMANDPROP $LOCKPROP wrapper.script.version=3.5.44 $ADDITIONAL_PARA"
eval $COMMAND_LINE
startwait
@@ -1981,67 +1960,24 @@ checkInstalled() {
installedStatus=$SERVICE_INSTALLED_DEFAULT
fi
elif [ "$DIST_OS" = "linux" ] ; then
- case "$DIST_LINUX_FAMILY" in
- 'Red Hat')
- if [ "X$1" != "Xstrict" -o \( -z "$USE_SYSTEMD" -a -z "$USE_UPSTART" \) ] ; then
- if [ -f "/etc/init.d/$APP_NAME" -o -L "/etc/init.d/$APP_NAME" ] ; then
- installedStatus=$SERVICE_INSTALLED_DEFAULT
- installedWith="init.d"
- fi
- fi
- if [ "X$1" != "Xstrict" -o -n "$USE_SYSTEMD" ] ; then
- if [ -f "${SYSTEMD_SERVICE_FILE}" ] ; then
- installedStatus=`expr $installedStatus + $SERVICE_INSTALLED_SYSTEMD`
- installedWith="${installedWith}${installedWith:+, }systemd"
- fi
- fi
- if [ "X$1" != "Xstrict" -o -n "$USE_UPSTART" ] ; then
- if [ -f "/etc/init/${APP_NAME}.conf" ] ; then
- installedStatus=`expr $installedStatus + $SERVICE_INSTALLED_UPSTART`
- installedWith="${installedWith}${installedWith:+, }upstart"
- fi
- fi
- ;;
- 'SUSE')
- if [ "X$1" != "Xstrict" -o \( -z "$USE_SYSTEMD" -a -z "$USE_UPSTART" \) ] ; then
- if [ -f "/etc/init.d/$APP_NAME" -o -L "/etc/init.d/$APP_NAME" ] ; then
- installedStatus=$SERVICE_INSTALLED_DEFAULT
- installedWith="init.d"
- fi
- fi
- if [ "X$1" != "Xstrict" -o -n "$USE_SYSTEMD" ] ; then
- if [ -f "${SYSTEMD_SERVICE_FILE}" ] ; then
- installedStatus=`expr $installedStatus + $SERVICE_INSTALLED_SYSTEMD`
- installedWith="${installedWith}${installedWith:+, }systemd"
- fi
- fi
- ;;
- 'Debian')
- if [ "X$1" != "Xstrict" -o \( -z "$USE_SYSTEMD" -a -z "$USE_UPSTART" \) ] ; then
- if [ -f "/etc/init.d/$APP_NAME" -o -L "/etc/init.d/$APP_NAME" ] ; then
- installedStatus=$SERVICE_INSTALLED_DEFAULT
- installedWith="init.d"
- fi
- fi
- if [ "X$1" != "Xstrict" -o -n "$USE_SYSTEMD" ] ; then
- if [ -f "${SYSTEMD_SERVICE_FILE}" ] ; then
- installedStatus=`expr $installedStatus + $SERVICE_INSTALLED_SYSTEMD`
- installedWith="${installedWith}${installedWith:+, }systemd"
- fi
- fi
- if [ "X$1" != "Xstrict" -o -n "$USE_UPSTART" ] ; then
- if [ -f "/etc/init/${APP_NAME}.conf" ] ; then
- installedStatus=`expr $installedStatus + $SERVICE_INSTALLED_UPSTART`
- installedWith="${installedWith}${installedWith:+, }upstart"
- fi
- fi
- ;;
- *)
+ if [ "X$1" != "Xstrict" -o \( -z "$USE_SYSTEMD" -a -z "$USE_UPSTART" \) ] ; then
if [ -f "/etc/init.d/$APP_NAME" -o -L "/etc/init.d/$APP_NAME" ] ; then
installedStatus=$SERVICE_INSTALLED_DEFAULT
+ installedWith="init.d"
fi
- ;;
- esac
+ fi
+ if [ "X$1" != "Xstrict" -o -n "$USE_SYSTEMD" ] ; then
+ if [ -f "${SYSTEMD_SERVICE_FILE}" ] ; then
+ installedStatus=`expr $installedStatus + $SERVICE_INSTALLED_SYSTEMD`
+ installedWith="${installedWith}${installedWith:+, }systemd"
+ fi
+ fi
+ if [ "X$1" != "Xstrict" -o -n "$USE_UPSTART" ] ; then
+ if [ -f "/etc/init/${APP_NAME}.conf" ] ; then
+ installedStatus=`expr $installedStatus + $SERVICE_INSTALLED_UPSTART`
+ installedWith="${installedWith}${installedWith:+, }upstart"
+ fi
+ fi
elif [ "$DIST_OS" = "hpux" ] ; then
if [ -f "/sbin/init.d/$APP_NAME" -o -L "/sbin/init.d/$APP_NAME" ] ; then
installedStatus=$SERVICE_INSTALLED_DEFAULT
@@ -2135,11 +2071,30 @@ validateAppNameLength() {
fi
}
-printDetectedDistro() {
- if [ "X$DIST_LINUX_NAME" != "X" ] ; then
- eval echo `gettext 'Detected $DIST_LINUX_NAME \($DIST_LINUX_FAMILY family\):'`
+resolveInitdCommand() {
+ # NOTE: update-rc.d & chkconfig are the recommended interfaces for managing
+ # init scripts. insserv is a low level tool used by these interfaces.
+ # chkconfig was available on old versions Ubuntu, but update-rc.d is
+ # preferred. chkconfig is used on RHEL based Linux.
+
+ # update-rc.d is used on distros such as Debian/Ubuntu
+ resolveLocation INITD_COMMAND "update-rc.d" ";/usr/sbin" 0
+ if [ $? -eq 0 ] ; then
+ USE_UPDATE_RC=1
else
- eval echo `gettext 'Detected $DIST_LINUX_FAMILY or one of its derivatives:'`
+ # chkconfig is used on distros such as RHEL or Amazon Linux
+ resolveLocation INITD_COMMAND chkconfig ";/sbin" 0
+ if [ $? -eq 0 ] ; then
+ USE_CHKCONFIG=1
+ else
+ # if neither chkconfig nor update-rc.d are present, try insserv
+ resolveLocation INITD_COMMAND insserv ";/sbin" 0
+ if [ $? -eq 0 ] ; then
+ USE_INSSERV=1
+ else
+ INITD_COMMAND=""
+ fi
+ fi
fi
}
@@ -2163,54 +2118,30 @@ installdaemon() {
ln -s "/etc/init.d/$APP_NAME" "/etc/rc3.d/S${APP_RUN_LEVEL_S}$APP_NAME_LOWER"
fi
elif [ "$DIST_OS" = "linux" ] ; then
- case "$DIST_LINUX_FAMILY" in
- 'Red Hat')
- printDetectedDistro
- if [ $installedStatus -ne $SERVICE_NOT_INSTALLED ] ; then
- eval echo `gettext ' The $APP_LONG_NAME daemon is already installed with $installedWith.'`
- elif [ -n "$USE_SYSTEMD" ] ; then
- systemdInstall
- elif [ -n "$USE_UPSTART" ] ; then
- upstartInstall
- else
- eval echo `gettext ' Installing the $APP_LONG_NAME daemon...'`
+ eval echo `gettext 'Detected Linux:'`
+ if [ $installedStatus -ne $SERVICE_NOT_INSTALLED ] ; then
+ eval echo `gettext ' The $APP_LONG_NAME daemon is already installed with $installedWith.'`
+ elif [ -n "$USE_SYSTEMD" ] ; then
+ systemdInstall
+ elif [ -n "$USE_UPSTART" ] ; then
+ upstartInstall
+ else
+ resolveInitdCommand
+ if [ -n "$USE_CHKCONFIG" ] ; then
+ eval echo `gettext ' Installing the $APP_LONG_NAME daemon with init.d \($INITD_COMMAND\)...'`
ln -s "$REALPATH" "/etc/init.d/$APP_NAME"
- /sbin/chkconfig --add "$APP_NAME"
- /sbin/chkconfig "$APP_NAME" on
- fi
- ;;
- 'SUSE')
- printDetectedDistro
- if [ $installedStatus -ne $SERVICE_NOT_INSTALLED ] ; then
- eval echo `gettext ' The $APP_LONG_NAME daemon is already installed with $installedWith.'`
- elif [ -n "$USE_SYSTEMD" ] ; then
- systemdInstall
- else
- eval echo `gettext ' Installing the $APP_LONG_NAME daemon...'`
+ $INITD_COMMAND --add "$APP_NAME"
+ $INITD_COMMAND "$APP_NAME" on
+ elif [ "$USE_INSSERV" ] ; then
+ eval echo `gettext ' Installing the $APP_LONG_NAME daemon with init.d \($INITD_COMMAND\)...'`
ln -s "$REALPATH" "/etc/init.d/$APP_NAME"
- insserv "/etc/init.d/$APP_NAME"
- fi
- ;;
- 'Debian')
- printDetectedDistro
- if [ $installedStatus -ne $SERVICE_NOT_INSTALLED ] ; then
- eval echo `gettext ' The $APP_LONG_NAME daemon is already installed with $installedWith.'`
- elif [ -n "$USE_SYSTEMD" ] ; then
- systemdInstall
- elif [ -n "$USE_UPSTART" ] ; then
- upstartInstall
- else
- eval echo `gettext ' Installing the $APP_LONG_NAME daemon using init.d...'`
+ $INITD_COMMAND "/etc/init.d/$APP_NAME"
+ elif [ "$USE_UPDATE_RC" ] ; then
+ eval echo `gettext ' Installing the $APP_LONG_NAME daemon with init.d \($INITD_COMMAND\)...'`
ln -s "$REALPATH" "/etc/init.d/$APP_NAME"
- update-rc.d "$APP_NAME" defaults
- fi
- ;;
- *)
- eval echo `gettext 'Detected Linux:'`
- if [ $installedStatus -ne $SERVICE_NOT_INSTALLED ] ; then
- eval echo `gettext ' The $APP_LONG_NAME daemon is already installed.'`
+ $INITD_COMMAND "$APP_NAME" defaults
else
- eval echo `gettext ' Installing the $APP_LONG_NAME daemon...'`
+ eval echo `gettext ' Installing the $APP_LONG_NAME daemon with init.d...'`
ln -s "$REALPATH" /etc/init.d/$APP_NAME
for i in `ls "/etc/rc3.d/K"??"$APP_NAME_LOWER" "/etc/rc5.d/K"??"$APP_NAME_LOWER" "/etc/rc3.d/S"??"$APP_NAME_LOWER" "/etc/rc5.d/S"??"$APP_NAME_LOWER" 2>/dev/null` ; do
eval echo `gettext ' Removing unexpected file before proceeding: $i'`
@@ -2221,8 +2152,7 @@ installdaemon() {
ln -s "/etc/init.d/$APP_NAME" "/etc/rc5.d/S${APP_RUN_LEVEL_S}$APP_NAME_LOWER"
ln -s "/etc/init.d/$APP_NAME" "/etc/rc5.d/K${APP_RUN_LEVEL_K}$APP_NAME_LOWER"
fi
- ;;
- esac
+ fi
elif [ "$DIST_OS" = "hpux" ] ; then
eval echo `gettext 'Detected HP-UX:'`
if [ $installedStatus -ne $SERVICE_NOT_INSTALLED ] ; then
@@ -2344,7 +2274,7 @@ installdaemon() {
echo '/etc/rc script executed, `date`' >>/etc/rc
fi
else
- eval echo `gettext 'Install not currently supported for $DIST_OS'`
+ eval echo `gettext 'Install not currently supported for $DIST_OS.'`
exit 1
fi
@@ -2436,7 +2366,7 @@ removedaemon() {
isBitSet $installedStatus $SERVICE_INSTALLED_DEFAULT
if [ $? -eq 1 ] ; then
stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon...'`
for i in `ls "/etc/rc3.d/K"??"$APP_NAME_LOWER" "/etc/rc3.d/S"??"$APP_NAME_LOWER" "/etc/init.d/$APP_NAME" 2>/dev/null` ; do
rm -f $i
done
@@ -2445,50 +2375,7 @@ removedaemon() {
exit 1
fi
elif [ "$DIST_OS" = "linux" ] ; then
- case "$DIST_LINUX_FAMILY" in
- 'Red Hat')
- printDetectedDistro
- isBitSet $installedStatus $SERVICE_INSTALLED_DEFAULT
- if [ $? -eq 1 ] ; then
- stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`
- /sbin/chkconfig "$APP_NAME" off
- /sbin/chkconfig --del "$APP_NAME"
- rm -f "/etc/init.d/$APP_NAME"
- fi
- ;;
- 'SUSE')
- printDetectedDistro
- isBitSet $installedStatus $SERVICE_INSTALLED_DEFAULT
- if [ $? -eq 1 ] ; then
- stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon from init.d...'`
- insserv -r "/etc/init.d/$APP_NAME"
- rm -f "/etc/init.d/$APP_NAME"
- fi
- ;;
- 'Debian')
- printDetectedDistro
- isBitSet $installedStatus $SERVICE_INSTALLED_DEFAULT
- if [ $? -eq 1 ] ; then
- stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon from init.d...'`
- update-rc.d -f "$APP_NAME" remove
- rm -f "/etc/init.d/$APP_NAME"
- fi
- ;;
- *)
- eval echo `gettext 'Detected Linux:'`
- isBitSet $installedStatus $SERVICE_INSTALLED_DEFAULT
- if [ $? -eq 1 ] ; then
- stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`
- for i in `ls "/etc/rc3.d/K"??"$APP_NAME_LOWER" "/etc/rc5.d/K"??"$APP_NAME_LOWER" "/etc/rc3.d/S"??"$APP_NAME_LOWER" "/etc/rc5.d/S"??"$APP_NAME_LOWER" "/etc/init.d/$APP_NAME" 2>/dev/null` ; do
- rm -f $i
- done
- fi
- ;;
- esac
+ eval echo `gettext 'Detected Linux:'`
isBitSet $installedStatus $SERVICE_INSTALLED_SYSTEMD
if [ $? -eq 1 ] ; then
systemdRemove
@@ -2497,6 +2384,27 @@ removedaemon() {
if [ $? -eq 1 ] ; then
upstartRemove
fi
+ isBitSet $installedStatus $SERVICE_INSTALLED_DEFAULT
+ if [ $? -eq 1 ] ; then
+ stopit "0"
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon from init.d...'`
+ resolveInitdCommand
+ if [ -n "$USE_CHKCONFIG" ] ; then
+ $INITD_COMMAND "$APP_NAME" off
+ $INITD_COMMAND --del "$APP_NAME"
+ rm -f "/etc/init.d/$APP_NAME"
+ elif [ "$USE_INSSERV" ] ; then
+ $INITD_COMMAND -r "/etc/init.d/$APP_NAME"
+ rm -f "/etc/init.d/$APP_NAME"
+ elif [ "$USE_UPDATE_RC" ] ; then
+ $INITD_COMMAND -f "$APP_NAME" remove
+ rm -f "/etc/init.d/$APP_NAME"
+ else
+ for i in `ls "/etc/rc3.d/K"??"$APP_NAME_LOWER" "/etc/rc5.d/K"??"$APP_NAME_LOWER" "/etc/rc3.d/S"??"$APP_NAME_LOWER" "/etc/rc5.d/S"??"$APP_NAME_LOWER" "/etc/init.d/$APP_NAME" 2>/dev/null` ; do
+ rm -f $i
+ done
+ fi
+ fi
if [ $installedStatus -eq $SERVICE_NOT_INSTALLED ] ; then
eval echo `gettext ' The $APP_LONG_NAME daemon is not currently installed.'`
exit 1
@@ -2506,7 +2414,7 @@ removedaemon() {
isBitSet $installedStatus $SERVICE_INSTALLED_DEFAULT
if [ $? -eq 1 ] ; then
stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon...'`
for i in `ls "/sbin/rc3.d/K"??"$APP_NAME_LOWER" "/sbin/rc3.d/S"??"$APP_NAME_LOWER" "/sbin/init.d/$APP_NAME" 2>/dev/null` ; do
rm -f $i
done
@@ -2518,7 +2426,7 @@ removedaemon() {
eval echo `gettext 'Detected AIX:'`
if [ $installedStatus -ne $SERVICE_NOT_INSTALLED ] ; then
stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon...'`
isBitSet $installedStatus $SERVICE_INSTALLED_DEFAULT
if [ $? -eq 1 ] ; then
for i in `ls "/etc/rc.d/rc2.d/K"??"$APP_NAME_LOWER" "/etc/rc.d/rc2.d/S"??"$APP_NAME_LOWER" "/etc/rc.d/init.d/$APP_NAME" 2>/dev/null` ; do
@@ -2542,7 +2450,7 @@ removedaemon() {
eval echo `gettext 'Detected FreeBSD:'`
if [ -f "/etc/rc.d/$APP_NAME" -o -L "/etc/rc.d/$APP_NAME" ] ; then
stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon...'`
for i in "/etc/rc.d/$APP_NAME"
do
rm -f $i
@@ -2556,7 +2464,7 @@ removedaemon() {
eval echo `gettext 'Detected Mac OSX:'`
if [ -f "/Library/LaunchDaemons/${APP_PLIST}" -o -L "/Library/LaunchDaemons/${APP_PLIST}" ] ; then
stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon...'`
# Make sure the plist is installed
LOADED_PLIST=`launchctl list | grep ${APP_PLIST_BASE}`
if [ "X${LOADED_PLIST}" != "X" ] ; then
@@ -2571,7 +2479,7 @@ removedaemon() {
eval echo `gettext 'Detected z/OS:'`
if [ -f /etc/rc.bak ] ; then
stopit "0"
- eval echo `gettext ' Removing $APP_LONG_NAME daemon...'`
+ eval echo `gettext ' Removing the $APP_LONG_NAME daemon...'`
cp /etc/rc /etc/rc.bak
sed "s/_BPX_JOBNAME=\'APP_NAME\'.*//g" /etc/rc.bak > /etc/rc
rm /etc/rc.bak
@@ -2580,7 +2488,7 @@ removedaemon() {
exit 1
fi
else
- eval echo `gettext 'Remove not currently supported for $DIST_OS'`
+ eval echo `gettext 'Remove not currently supported for $DIST_OS.'`
exit 1
fi
}
diff --git a/server-product/jsw/AppCommand.bat.in b/server-product/jsw/AppCommand.bat.in
index 6b80b6379d..30d6a5a545 100644
--- a/server-product/jsw/AppCommand.bat.in
+++ b/server-product/jsw/AppCommand.bat.in
@@ -2,7 +2,7 @@
setlocal
rem
-rem Copyright (c) 1999, 2019 Tanuki Software, Ltd.
+rem Copyright (c) 1999, 2020 Tanuki Software, Ltd.
rem http://www.tanukisoftware.com
rem All rights reserved.
rem
@@ -16,7 +16,7 @@ rem
rem -----------------------------------------------------------------------------
rem These settings can be modified to fit the needs of your application
-rem Optimized for use with version 3.5.41-st of the Wrapper.
+rem Optimized for use with version 3.5.44-st of the Wrapper.
rem The base name for the Wrapper binary.
set _WRAPPER_BASE=wrapper
diff --git a/server-product/jsw/wrapper-delta-pack-3.5.44-st.zip b/server-product/jsw/wrapper-delta-pack-3.5.44-st.zip
new file mode 100644
index 0000000000..47182310dc
Binary files /dev/null and b/server-product/jsw/wrapper-delta-pack-3.5.44-st.zip differ
diff --git a/server-product/jsw/wrapper-delta-pack.zip b/server-product/jsw/wrapper-delta-pack.zip
deleted file mode 100644
index d5f92c7bd3..0000000000
Binary files a/server-product/jsw/wrapper-delta-pack.zip and /dev/null differ
diff --git a/server-product/jsw/wrapper.conf b/server-product/jsw/wrapper.conf
index 28f1886f83..8b1659409b 100644
--- a/server-product/jsw/wrapper.conf
+++ b/server-product/jsw/wrapper.conf
@@ -39,7 +39,7 @@ wrapper.pidfile=../status/onedev.pid
wrapper.single_invocation=TRUE
#********************************************************************
-# Wrapper Java Properties. GitPlex requires at least Java version 8
+# Wrapper Java Properties. OneDev requires at least Java version 8
#********************************************************************
# Specify Java 8 executable to be used. You may simply specify it as "java"
# if the one in system path is appropriate, or specify the full path to
diff --git a/server-product/system/conf/wrapper-license.conf b/server-product/system/conf/wrapper-license.conf
index 15abf3762c..10aecb6e3f 100644
--- a/server-product/system/conf/wrapper-license.conf
+++ b/server-product/system/conf/wrapper-license.conf
@@ -1,13 +1,12 @@
#encoding=UTF-8
wrapper.license.type=DEV
-wrapper.license.id=202001220000017
-wrapper.license.licensee=Robin Shen
-wrapper.license.group=OneDev
-wrapper.license.dev_application=OneDev
+wrapper.license.id=202011090000032
+wrapper.license.licensee=OneDev
+wrapper.license.group=service wrapping
+wrapper.license.dev_application=Service Wrapping
wrapper.license.features=64bit
-wrapper.license.upgrade_term.begin_date=2009-04-26
-wrapper.license.upgrade_term.end_date=2020-04-26
-wrapper.license.key.1=883e-7577-476b-bbe7
-wrapper.license.key.2=9166-d4c4-a74b-91c7
-wrapper.license.key.3=0a08-977a-7c5a-3514
-wrapper.license.key.4=72b7-9640-9410-66da
\ No newline at end of file
+wrapper.license.key.0=5fa8-07f0-6085-83f0
+wrapper.license.key.1=1ded-2c24-6b8e-324e
+wrapper.license.key.2=3676-6bfc-dc6d-0667
+wrapper.license.key.3=bbc8-7f00-5178-2737
+wrapper.license.key.4=f359-433c-57ff-833e
\ No newline at end of file