forked from I2P_Developers/i2p.i2p

The aging v3.1.x of the java wrapper is being replaced in this checkin with the latest (current) stable release, 3.5.9. There is now only one copy of wrapper.jar, located in wrapper/all. The build.xml scripts have been changed to reflect this new path. All binaries--with the exception of solaris (I don't have SPARC hardware)--have been stripped. FreeBSD x64 is being included in this release. I have only included the x86 macosx wrapper due to not having a system to test the x64 code on. On the plus side, the wrapper is universal (a FAT powerpc & Intel Mac) binary. No more prompting to install Rosetta!
84 lines
2.0 KiB
Bash
84 lines
2.0 KiB
Bash
#!/bin/sh
|
|
|
|
# I2P Installer - Installs and pre-configures I2P.
|
|
#
|
|
# postinstall
|
|
# 2004 The I2P Project
|
|
# http://www.i2p2.de/
|
|
# 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.
|
|
|
|
if [ ! "X$1" = "X" ]; then
|
|
cd $1
|
|
fi
|
|
|
|
chmod 755 ./i2prouter
|
|
# chmod 755 ./install_i2p_service_unix
|
|
chmod 755 ./osid
|
|
chmod 755 ./runplain.sh
|
|
# chmod 755 ./uninstall_i2p_service_unix
|
|
|
|
ERROR_MSG="Cannot determine operating system type. From the subdirectory in lib/wrapper matching your operating system, please move i2psvc to your base I2P directory, and move the remaining two files to the lib directory."
|
|
|
|
HOST_OS=`./osid`
|
|
|
|
if [ "X$HOST_OS" = "X" -o $HOST_OS = "unknown" ]; then
|
|
echo "$ERROR_MSG"
|
|
exit 1
|
|
fi
|
|
|
|
OS_ARCH=`uname -m`
|
|
X86_64=`echo "${OS_ARCH}" | grep x86_64`
|
|
|
|
case $HOST_OS in
|
|
debian | fedora | gentoo | linux | mandrake | redhat | suse )
|
|
if [ "X$X86_64" = "X" ]; then
|
|
wrapperpath="./lib/wrapper/linux"
|
|
cp ${wrapperpath}/libwrapper.so ./lib/
|
|
else
|
|
wrapperpath="./lib/wrapper/linux64"
|
|
cp ${wrapperpath}/libwrapper.so ./lib
|
|
fi
|
|
;;
|
|
freebsd )
|
|
if [ ! `uname -m |grep amd64` ]; then
|
|
wrapperpath="./lib/wrapper/freebsd"
|
|
cp ${wrapperpath}/libwrapper.so ./lib/
|
|
else
|
|
wrapperpath="./lib/wrapper/freebsd64"
|
|
cp ${wrapperpath}/libwrapper.so ./lib/
|
|
fi
|
|
;;
|
|
osx )
|
|
wrapperpath="./lib/wrapper/macosx"
|
|
cp ${wrapperpath}/libwrapper.jnilib ./lib/
|
|
;;
|
|
solaris )
|
|
wrapperpath="./lib/wrapper/solaris"
|
|
cp ${wrapperpath}/libwrapper.so ./lib/
|
|
;;
|
|
* )
|
|
echo "${ERROR_MSG}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
#cp $wrapperpath/wrapper.jar ./lib/
|
|
cp $wrapperpath/i2psvc .
|
|
chmod 755 ./eepget
|
|
chmod 755 ./i2psvc
|
|
rm -rf ./icons
|
|
rm -rf ./lib/wrapper
|
|
rm -f ./lib/*.dll
|
|
rm -f ./*.bat
|
|
rm -f ./*.exe
|
|
rm -rf ./installer
|
|
# no, let's not start the router from the install script any more
|
|
# ./i2prouter start
|
|
exit 0
|
|
|