service wrapper is now fully integrated
This commit is contained in:
20
build.xml
20
build.xml
@ -218,17 +218,35 @@
|
||||
<copy file="build/xml-apis.jar" todir="pkg-temp/lib/" />
|
||||
<copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
|
||||
<copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
|
||||
<copy file="hosts.txt" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/clients.config" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/i2prouter" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/i2ptunnel.config" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/install_i2p_service_unix" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/osid" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/postinstall" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/postinstall.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/systray.config" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/uninstall_i2p_service_unix" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />
|
||||
<copy file="installer/resources/wrapper.conf" todir="pkg-temp/" />
|
||||
<copy todir="pkg-temp/lib/wrapper/freebsd/">
|
||||
<fileset dir="installer/lib/wrapper/freebsd/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/linux/">
|
||||
<fileset dir="installer/lib/wrapper/linux/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/macosx/">
|
||||
<fileset dir="installer/lib/wrapper/macosx/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/solaris/">
|
||||
<fileset dir="installer/lib/wrapper/solaris/" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/lib/wrapper/win32/">
|
||||
<fileset dir="installer/lib/wrapper/win32/" />
|
||||
</copy>
|
||||
<copy file="hosts.txt" todir="pkg-temp/" />
|
||||
<copy file="readme.txt" todir="pkg-temp/" />
|
||||
</target>
|
||||
<target name="tarball" depends="preppkg">
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
|
||||
|
||||
<processing>
|
||||
<job name="launch i2p windows">
|
||||
<os family="windows" />
|
||||
<executefile name="$INSTALL_PATH/i2prouter.bat" />
|
||||
</job>
|
||||
<job name="launch i2p unix">
|
||||
<os family="unix" />
|
||||
<executefile name="$INSTALL_PATH/i2prouter">
|
||||
<arg>console</arg>
|
||||
</executefile>
|
||||
</job>
|
||||
</processing>
|
@ -11,7 +11,7 @@
|
||||
<url>http://www.i2p.net</url>
|
||||
</info>
|
||||
|
||||
<guiprefs width="580" height="356" resizable="yes">
|
||||
<guiprefs width="590" height="356" resizable="yes">
|
||||
<laf name="liquid">
|
||||
<os family="unix"/>
|
||||
</laf>
|
||||
@ -24,6 +24,7 @@
|
||||
<resources>
|
||||
<res id="Installer.image" src="installer/resources/i2plogo.png" />
|
||||
<res id="InfoPanel.info" src="installer/resources/readme.license.txt"/>
|
||||
<res id="ProcessPanel.Spec.xml" src="installer/resources/ProcessPanel.Spec.xml"/>
|
||||
</resources>
|
||||
|
||||
<panels>
|
||||
@ -31,8 +32,8 @@
|
||||
<panel classname="InfoPanel"/>
|
||||
<panel classname="TargetPanel"/>
|
||||
<panel classname="InstallPanel"/>
|
||||
<panel classname="SimpleFinishPanel"/>
|
||||
<panel classname="ProcessPanel"/>
|
||||
<panel classname="SimpleFinishPanel"/>
|
||||
</panels>
|
||||
|
||||
<packs>
|
||||
|
12
installer/resources/ProcessPanel.Spec.xml
Normal file
12
installer/resources/ProcessPanel.Spec.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
|
||||
|
||||
<processing>
|
||||
<job name="Launching I2P...">
|
||||
<os family="windows" />
|
||||
<executefile name="$INSTALL_PATH/postinstall.bat" />
|
||||
</job>
|
||||
<job name="Launching I2P...">
|
||||
<os family="unix" />
|
||||
<executefile name="$INSTALL_PATH/postinstall" />
|
||||
</job>
|
||||
</processing>
|
@ -9,20 +9,22 @@
|
||||
#
|
||||
# author: hypercubus
|
||||
#
|
||||
# Installs I2P as a service on various *nix systems using Wrapper. This script
|
||||
# must be run as root.
|
||||
# Installs I2P as a service on various *nix systems using Java Service Wrapper.
|
||||
# This script must be run as root.
|
||||
#
|
||||
# Wrapper can be found at:
|
||||
# Java Service Wrapper can be found at:
|
||||
# http://wrapper.tanukisoftware.org/doc/english/introduction.html
|
||||
|
||||
if [ $UID -ne 0 ]; then
|
||||
echo 'Sorry, you need root privileges to install services.'
|
||||
echo "Sorry, you need root privileges to install services."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HOST_OS=`uname -a`
|
||||
if [ ! '$HOST_OS' ]; then
|
||||
echo 'Cannot determine operating system type. Aborting service installation.'
|
||||
ERROR_MSG="Cannot determine operating system type. Please install the service manually."
|
||||
HOST_OS=`./osid`
|
||||
|
||||
if [[ ! $HOST_OS || $HOST_OS = "unknown" ]]; then
|
||||
echo "$ERROR_MSG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -62,55 +64,26 @@ install_sysv()
|
||||
ln -sf /etc/init.d/i2psvc /etc/rc3.d/S20i2psvc
|
||||
}
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Darwin` || `echo "$HOST_OS" | grep Macintosh` ]]; then
|
||||
install_bsd
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep FreeBSD` ]]; then
|
||||
install_bsd
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Linux` ]]; then
|
||||
|
||||
LINUX_DISTRO=`cat /proc/version`
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Debian` ]]; then
|
||||
case $HOST_OS in
|
||||
debian )
|
||||
install_debian
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Fedora` ]]; then
|
||||
;;
|
||||
fedora | mandrake | redhat | suse )
|
||||
install_redhat
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Gentoo` ]]; then
|
||||
;;
|
||||
freebsd | osx )
|
||||
install_bsd
|
||||
;;
|
||||
gentoo )
|
||||
install_gentoo
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
solaris )
|
||||
install_sysv
|
||||
;;
|
||||
* )
|
||||
echo "$ERROR_MSG"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Mandrake` ]]; then
|
||||
install_redhat
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep "Red Hat"` ]]; then
|
||||
install_redhat
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Suse` ]]; then
|
||||
install_redhat
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Solaris` ]]; then
|
||||
install_sysv()
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo 'Cannot determine operating system type. Aborting service installation.'
|
||||
exit 1
|
||||
exit 0
|
||||
|
87
installer/resources/osid
Normal file
87
installer/resources/osid
Normal file
@ -0,0 +1,87 @@
|
||||
#!/bin/sh
|
||||
|
||||
# I2P Installer - Installs and pre-configures I2P.
|
||||
#
|
||||
# osid
|
||||
# 2004 The I2P Project
|
||||
# http://www.i2p.net
|
||||
# This code is public domain.
|
||||
#
|
||||
# author: hypercubus
|
||||
#
|
||||
# Identifies the host OS by returning the corresponding standardized ID string:
|
||||
#
|
||||
# debian = Debian
|
||||
# fedora = Fedora
|
||||
# freebsd = FreeBSD
|
||||
# gentoo = Gentoo
|
||||
# linux = unidentified Linux distro
|
||||
# mandrake = Mandrake
|
||||
# osx = Mac OS X
|
||||
# redhat = Red Hat
|
||||
# solaris = Solaris
|
||||
# suse = SuSE
|
||||
# unknown = OS could not be determined
|
||||
|
||||
HOST_OS=`uname -a`
|
||||
|
||||
if [ ! '$HOST_OS' ]; then
|
||||
echo unknown
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Darwin` && `echo "$HOST_OS" | grep Mac` ]]; then
|
||||
echo osx
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep FreeBSD` ]]; then
|
||||
echo freebsd
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Linux` ]]; then
|
||||
|
||||
LINUX_DISTRO=`cat /proc/version`
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Debian` ]]; then
|
||||
echo debian
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Fedora` ]]; then
|
||||
echo fedora
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Gentoo` ]]; then
|
||||
echo gentoo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Mandrake` ]]; then
|
||||
echo mandrake
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep "Red Hat"` ]]; then
|
||||
echo redhat
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Suse` ]]; then
|
||||
echo suse
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo linux
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Solaris` ]]; then
|
||||
echo solaris
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo unknown
|
||||
exit 0
|
44
installer/resources/postinstall
Normal file
44
installer/resources/postinstall
Normal file
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
# I2P Installer - Installs and pre-configures I2P.
|
||||
#
|
||||
# postinstall
|
||||
# 2004 The I2P Project
|
||||
# http://www.i2p.net
|
||||
# This code is public domain.
|
||||
#
|
||||
# author: hypercubus
|
||||
#
|
||||
# Installs the appropriate set of Java Service Wrapper support files for the
|
||||
# user's OS then launches the I2P router as a background service.
|
||||
|
||||
ERROR_MSG="Cannot determine operating system type. Please move the service files manually from the subdirectory in lib/wrapper for your OS."
|
||||
HOST_OS=`./osid`
|
||||
|
||||
if [[ ! $HOST_OS || $HOST_OS = "unknown" ]]; then
|
||||
echo "$ERROR_MSG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $HOST_OS in
|
||||
debian | fedora | gentoo | linux | mandrake | redhat | suse )
|
||||
wrapperpath="./lib/wrapper/linux"
|
||||
;;
|
||||
freebsd )
|
||||
wrapperpath="./lib/wrapper/freebsd"
|
||||
;;
|
||||
osx )
|
||||
wrapperpath="./lib/wrapper/macosx"
|
||||
;;
|
||||
solaris )
|
||||
wrapperpath="./lib/wrapper/solaris"
|
||||
;;
|
||||
* )
|
||||
echo "$ERROR_MSG"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
cp $wrapperpath/i2psvc .
|
||||
cp $wrapperpath/* ./lib/
|
||||
exit 0
|
18
installer/resources/postinstall.bat
Normal file
18
installer/resources/postinstall.bat
Normal file
@ -0,0 +1,18 @@
|
||||
:: I2P Installer - Installs and pre-configures I2P.
|
||||
::
|
||||
:: postinstall.bat
|
||||
:: 2004 The I2P Project
|
||||
:: http://www.i2p.net
|
||||
:: This code is public domain.
|
||||
::
|
||||
:: author: hypercubus
|
||||
::
|
||||
:: Installs the Java Service Wrapper support files for Win32 then launches the
|
||||
:: I2P router as a background service.
|
||||
|
||||
@echo off
|
||||
set INSTALL_PATH=%~dp0
|
||||
copy "%INSTALL_PATH%lib\wrapper\win32\I2Psvc.exe" "%INSTALL_PATH%"
|
||||
copy "%INSTALL_PATH%lib\wrapper\win32\wrapper.dll" "%INSTALL_PATH%lib"
|
||||
copy "%INSTALL_PATH%lib\wrapper\win32\wrapper.jar" "%INSTALL_PATH%lib"
|
||||
"%INSTALL_PATH%i2prouter.bat"
|
@ -9,26 +9,28 @@
|
||||
#
|
||||
# author: hypercubus
|
||||
#
|
||||
# Uninstalls the Wrapper-based I2P service on various *nix systems. This script
|
||||
# must be run as root.
|
||||
# Uninstalls the Java Service Wrapper-based I2P service on various *nix systems.
|
||||
# This script must be run as root.
|
||||
#
|
||||
# Wrapper can be found at:
|
||||
# Java Service Wrapper can be found at:
|
||||
# http://wrapper.tanukisoftware.org/doc/english/introduction.html
|
||||
|
||||
if [ $UID -ne 0 ]; then
|
||||
echo 'Sorry, you need root privileges to uninstall services.'
|
||||
echo "Sorry, you need root privileges to uninstall services."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HOST_OS=`uname -a`
|
||||
if [ ! '$HOST_OS' ]; then
|
||||
echo 'Cannot determine operating system type. Please uninstall the service manually.'
|
||||
ERROR_MSG="Cannot determine operating system type. Please uninstall the service manually."
|
||||
HOST_OS=`./osid`
|
||||
|
||||
if [[ ! $HOST_OS || $HOST_OS = "unknown" ]]; then
|
||||
echo "$ERROR_MSG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# The following are several different service installation methods covering some
|
||||
# of the major *nix operating systems. Most *nix OSes should be able to use one
|
||||
# of these styles. TODO: AIX, HP-UX, HP-UX/64, IRIX, OSF/1.
|
||||
# The following are several different service uninstallation methods covering
|
||||
# some of the major *nix operating systems. Most *nix OSes should be able to use
|
||||
# one of these styles. TODO: AIX, HP-UX, HP-UX/64, IRIX, OSF/1.
|
||||
|
||||
uninstall_bsd()
|
||||
{
|
||||
@ -62,55 +64,26 @@ uninstall_sysv()
|
||||
rm /etc/rc3.d/S20i2psvc
|
||||
}
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Darwin` || `echo "$HOST_OS" | grep Macintosh` ]]; then
|
||||
uninstall_bsd
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep FreeBSD` ]]; then
|
||||
uninstall_bsd
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Linux` ]]; then
|
||||
|
||||
LINUX_DISTRO=`cat /proc/version`
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Debian` ]]; then
|
||||
case $HOST_OS in
|
||||
debian )
|
||||
uninstall_debian
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Fedora` ]]; then
|
||||
;;
|
||||
fedora | mandrake | redhat | suse )
|
||||
uninstall_redhat
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Gentoo` ]]; then
|
||||
;;
|
||||
freebsd | osx )
|
||||
uninstall_bsd
|
||||
;;
|
||||
gentoo )
|
||||
uninstall_gentoo
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
solaris )
|
||||
uninstall_sysv
|
||||
;;
|
||||
* )
|
||||
echo "$ERROR_MSG"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Mandrake` ]]; then
|
||||
uninstall_redhat
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep "Red Hat"` ]]; then
|
||||
uninstall_redhat
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ `echo "$LINUX_DISTRO" | grep Suse` ]]; then
|
||||
uninstall_redhat
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ `echo "$HOST_OS" | grep Solaris` ]]; then
|
||||
uninstall_sysv()
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo 'Cannot determine operating system type. Please uninstall the service manually.'
|
||||
exit 1
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user