Commit Graph

38 Commits

Author SHA1 Message Date
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
58461ff5bb * Bugfix: Running the installer as a non-privileged user on Red Hat (and
hopefully any other affected *nix systems) now properly discards non-
   essential directories after installation.
* Support for Win9x in the installer and postinstall.bat.
* Changed the name of the default installation directory on all platforms
   from "I2P" to "i2p" in the installer.
* Changed "wrapper.conf" to "wrapper.config" for naming consistency with the
   other configuration files.
2004-09-08 22:04:13 +00:00
944d467654 changed deprecated 'tail -1' to 'tail -n 1'; the Java Service Wrapper team will probably change it soon, but we need this for 0.4 2004-08-29 17:59:10 +00:00
53213bb553 fixed relative path problem so 'i2psvc' can be found 2004-08-26 14:48:10 +00:00
c88c245094 * moving wrapper scripts to installer/resources
* added wrapper files to the 'installer' target of the global build.xml
2004-08-24 12:25:46 +00:00