Commit Graph

54 Commits

Author SHA1 Message Date
b096834a54 installer/resources/i2prouter: various bugfixes
- Explicitly specify shell when RUN_AS_USER is set. This allows I2P to start
  under limited accounts that do not have a defined shell.
- When installing as a service, point out that I2P_CONFIG_DIR may need to be
  set. I2P_CONFIG_DIR defaults to $HOME/.i2p for the user that installed I2P
  and when running as a service this may not be desired.
  (e.g., RUN_AS_USER=i2p & I2P_CONFIG_DIR=/root/.i2p)

(The RUN_AS_USER shell problem was spotted at https://github.com/mattias-ohlsson/i2p/blob/master/i2p.spec)
2013-05-15 13:04:46 +00:00
zzz
6d2fa690dc quoting fixups 2012-12-22 19:30:36 +00:00
9a241af241 enable translations for 'i2prouter' 2012-12-22 15:10:57 +00:00
69d22b84f9 i2prouter: integrate modifications from upstream (Tanuki) 2012-12-22 14:57:28 +00:00
0b05cd761c i2prouter: fix block location (thanks k0e) 2012-11-23 18:08:04 +00:00
34e0b36401 updates to 'i2prouter' based on changes to Tanuki's example script 2012-11-21 21:03:55 +00:00
d0a3c7256a Improved support for GNU/kFreeBSD
- add kFreeBSD to NBI and CPUID
- add kFreeBSD to jcpuid/jbigi build scripts
- refresh debian patches to compensate for kFreeBSD changes
- i2prouter: Detect kFreeBSD and normalize its name
- clean up osid (switching to "elif") and adding support for detecting kFreeBSD
- update postinstall.sh; I2P cannot be installed using gij so postinstall.sh
  will not be run. If/when openjdk finally comes to kFreeBSD, we'll be ready for it.
2012-11-19 22:41:54 +00:00
f6bac8a08e redirect output to /dev/null (in case /proc/1/comm doesn't exist) 2012-10-30 19:41:35 +00:00
cb56b76ef9 i2prouter: check /proc/1/comm for systemd (thanks k0e) 2012-10-13 12:45:25 +00:00
eff238e85c i2prouter: In Slackware, check for existence of /etc/rc.d/rc.i2p when installing as a daemon 2012-10-12 17:26:03 +00:00
1f98493dbd i2prouter: add initscript support to Slackware 2012-10-10 22:44:42 +00:00
f20d906b67 i2prouter: Add systemd support for Arch Linux and SuSE Linux. 2012-10-10 21:33:05 +00:00
f5b808b997 OSX: Fixed a bug in OS_VER variable.
the old version (grep -o '[0-9]*\.[0-9]*\.[0-9]*') won't detect versions as 10.8, or 10.7
added cut -d: -f2 | sed -e 's/[^0-9]*//' , matching both 10.8, 10.7.4, etc.
2012-08-11 11:40:05 +00:00
cc3a8e5d62 have izpack expand %USER_HOME in i2prouter
This will solve the issue of I2P_CONFIG_DIR being set incorrectly if another
user runs i2prouter once, such as when installing the initscript.
2012-08-04 17:32:11 +00:00
945cc55b54 move check for binary down since osx binaries are no longer 'fat' 2012-07-12 22:43:12 +00:00
af398632f3 Add initscript support to i2prouter for ArchLinux
With this commit, ArchLinux users can run "i2prouter install" to install an
initscript to /etc/rc.d.
2012-05-28 16:59:47 +00:00
2f685d53a7 Redirect "which" output to /dev/null 2012-02-10 19:44:12 +00:00
0932f77fac pidfile is now set via i2prouter, not wrapper.config 2012-02-08 15:21:43 +00:00
zzz
37bb7ac8ca * Wrapper files:
- Move PID and status files to config dir in i2prouter
    - Don't set PID files in wrapper.config as Windows doesn't need them
      and the wrapper won't start if the dir doesn't exist
    - Move wrapper.log to config dir using override in i2prouter,
      Windows stays in system temp dir
    - Move wrapper.log to config dir for no wrapper
    - Move wrapper.log setup for no wrapper from RouterLaunch
      to WorkingDir
    - Redirect stderr too when no wrapper
    - Create config dir in i2prouter for Linux/Mac
2012-02-04 13:11:54 +00:00
f6babeecd2 Add quotes around path variables 2012-01-28 22:10:33 +00:00
d9f3e9e2e7 try to parse the pidfile location from wrapper.config 2012-01-28 22:08:39 +00:00
50f270fd76 i2prouter: look for external gettext in the path 2012-01-14 02:28:10 +00:00
zzz
ba5be7449b translation infrastructure for i2prouter script 2012-01-13 22:26:35 +00:00
zzz
352c6ba4ba * i2prouter: Don't attempt to translate strings from script 2012-01-09 23:58:24 +00:00
430ac8323f Really send HUP signal when called with the graceful parameter 2012-01-08 19:08:04 +00:00
zzz
f6ca6a5e0d * Router shutdown:
- Fix failsafe shutdown hook broken in 0.8.8;
      HUP, INT, and TERM signals should now shut down cleanly.
    - Shutdown hook no longer prevents other hooks from running
    - Trap HUP, if router.gracefulHUP=true, and do graceful shutdown.
      Only under wrapper, non-Windows.
    - i2prouter stop now uses SIGTERM
    - Implement i2prouter graceful using SIGHUP (ticket #580)
    - Configure wrapper to ignore SIGUSR1 and SIGUSR2 as they will shut down
      or crash the JVM
2012-01-08 13:15:47 +00:00
4c76a93adb Add CPU type check for OSX
I removed Tanuki's broken CPU "bitness" check for OSX in
3db46be1ede7d858b6c319905cf310d99227eb29. With this commit I add one that
works. Note that at this point we don't use the "bitness" checking because we
ship a quad-fat wrapper for OSX. Unfortunately, one can only manipulate the osx
binaries with "lipo" which is only available in OSX. In the future we may want
to use the "bitness" logic.

In any case, the old check set the bits to 64 for Leopard and above, but just
because a Mac is running Leopard or Snow Leopard doesn't mean it's 64bit
capable. This addition of mine will actually check the flags using sysctl. I'm
not using uname because OSX < Lion starts in 32bit mode by default (but can
still run 64bit binaries).
2011-12-31 22:46:49 +00:00
bd14dc3112 i2prouter: set locale environment variables if LANG not set
Check for /etc/environment and /etc/default/locale and retrieve/set locale
variables from them--but only if LANG is unset. This should help in those
cases in which someone is starting I2P as a daemon using an initscript and I2P is
starting /before/ the environment is configured, leading to the wrong file
encoding being detected.
2011-12-19 18:14:21 +00:00
6fa01a3b2d Better command to determine JAVABINARY
Switch to one awk command instead of using grep and cut.
2011-12-10 20:11:21 +00:00
85d7cfb9e0 Remove broken if statement
Tanuki's script has a broken check for 
OSX versions older than Leopard that sets
the CPU bitness to 32 for < 10.5. Since the
doesn't even work on Tiger (or older) (and
our binary is quad-FAT), this check is not 
neeeded.
2011-11-21 22:02:41 +00:00
f97779bed7 fix stupid typo by adding a missing ! (*facepalm*) 2011-11-21 21:36:49 +00:00
6849427b4f *Sigh* The WRAPPER_CONF variable exists and I don't know why I didn't use it
before with my 'gentoo hack'.
2011-11-09 18:30:21 +00:00
32a4ccc575 Gentoo compatibility
Update i2prouter to be more compatible with Gentoo systems and add a commented out entry to wrapper.config
2011-11-02 00:05:51 +00:00
a8746e4780 updates to i2prouter based upon changes from 3.5.9 -> 3.5.12 in tanuki's
src/bin/sh.script.in
2011-09-30 16:02:02 +00:00
5d43282188 Remove note about the misc/compat6x port; it is no longer required 2011-09-29 22:50:51 +00:00
7f6c4faeb5 Add "uninstall" as an alternative option for "remove" 2011-09-18 15:37:31 +00:00
22cb45ac40 Add explicit "install as a service" support for Debian and its derivatives
The upstream script has support for Ubuntu but not Debian. This change allows
the same methods used for Ubuntu to be used for Debian. This *should* work for
any version of Linux that has Debian in its family tree.
2011-09-13 21:36:41 +00:00
667e4345a0 Fix "bashisms" in tanuki's script 2011-09-13 01:18:58 +00:00
98c44f1bbd Abort by default if I2P is attempted to be started as root; allow setting
ALLOW_ROOT to override.
2011-09-13 01:16:12 +00:00
b0718f6b55 Also set a trap on signal 2 so that the failure message isn't displayed if I2P
is shutdown while running as a console application.
2011-09-13 00:55:37 +00:00
57afc4cd5d Advise to set RUN_AS_USER when installing as a daemon 2011-09-13 00:09:36 +00:00
3fe50e1d47 fail gracefully when trying to install as a daemon in Arch Linux 2011-09-12 23:03:52 +00:00
c8395df513 update of the i2prouter script based upon Tanuki's 3.5.9 script
With this check-in comes an update of our i2prouter script based upon the
script src/bin/sh.script.in from the 3.5.9 source tarball of the wrapper.

Some of the benefits of this newer version include:
- logic to determine which wrapper binary to use (32bit VS 64bit) and falling
  back to alternate "bitness." This would be most useful for portable packages.
- support for far more platforms and archs than the 3.1.1 based script (such as
  Solaris, risc, os/390, HP-UX, AIX, mips, ia64, etc.)
- support for installing I2P as a daemon in most UNIX-based environments with
  the command "i2prouter install".  The installed service can be removed with
  "i2prouter remove". With testing this option has been confirmed to work in
  OSX, Fedora, Slackware, Debian, Ubuntu, FreeBSD, and SuSE.  It does not work
  in Arch Linux (yet).
2011-09-12 22:53:57 +00:00
43ed1aa320 Make i2prouter fail more gracefully if the wrapper cannot be loaded
(either wrong architecture or i2psvc is just plain missing) and give
a more useful error message.
2011-06-21 22:45:21 +00:00
zzz
abd96a920f 0.7.11 2010-02-15 12:43:28 +00:00
zzz
b97197c0fa * Debian: Fixup, update, enhance dream's scripts
* build.xml: Speed up sponge's distclean additions
2010-01-26 15:21:41 +00:00
zzz
5aa254a178 add comments 2009-10-26 14:18:57 +00:00
zzz
cc533b0431 * Add wrapper.config and i2prouter comments for 'portable'
* Recognize same base and config dir in WorkingDir
    * Reformat XInfoPanel in installer for clarity
2009-07-26 14:55:01 +00:00
zzz
24daf00616 * i2prouter:
- Don't cd to script location, no longer required
    * RouterLaunch:
      - If no wrapper, put wrapper.log in system temp dir
        unless specified with -Dwrapper.logfile=/path/to/wrapper.log
        or it already exists in CWD (for backward compatibility)
      - Append rather than replace wrapper.log
      - Pass wrapper log location to router as a property, so that logs.jsp can find it
    * logs.jsp:
      - Get wrapper log location from a property too
    * runplain.sh:
      - Add path substitution to runplain.sh on install
      - Pass I2P base dir to the router as a property
    * wrapper.config:
      - Put wrapper.log in system temp dir for new installs
      - Pass I2P base dir to the router as a property
    * WorkingDir:
      - Don't migrate an existing install by default
      - Never migrate the data (too hard)
2009-06-13 21:04:27 +00:00
zzz
daf078d4d7 * Installer:
- Add install and temp path substitution to wrapper.config and
        i2prouter on install
2009-06-12 12:23:25 +00:00