Files
i2p.itoopie/installer/resources/postinstall

45 lines
1.0 KiB
Plaintext
Raw Normal View History

#!/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